Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,099
Community Members
 
Community Events
168
Community Groups

Setting Request Type with /rest/api/2/issue endpoint.

Hi, can you please assist? 

I am successful in adding general requests and tickets created. I have noticed that I cannot set the Request Type with my calls. 

Endpoint: /rest/api/2/issue

Payload: 

{"fields":{"project":{"key":"EN**"},"issuetype":{"name":"[System] Incident"},"reporter":{"id":"619b6b0d6dxxxxxxxxxxxxxxx"},"summary":"Test Summary","description":"Test Description","customfield_10191":{"value":"Credit Risk & Underwriting"},"priority":{"name":"Low"},"customfield_10176":{"id":"10428"},"customfield_10190":"2022-08-26T12:30:00","customfield_10188":{"id":"10518"},"customfield_10189":"Test Lead"},"customfield_10010": {"id":"363"}}
customfield_10010 referees to the Request Type. I have tried text, id's ... used objects to pass these values and I don't get any feedback there is a problem with the call however when I open the ticket that is created the Request Type is not there.
Any advice or steering would be greatly appreciated.

2 answers

2 accepted

2 votes
Answer accepted

Hi @hiltonriddex ,

welcome to the Atlassian community!

Using rest API  /rest/api/2/issue you are simulating issue creation trough jira interface (so request type is not available).

In ordert to set Request Type you need to use portal rest api provided by Service Desk, Try to use the following rest api /rest/servicedeskapi/request

Hope this helps,

Fabio

1 vote
Answer accepted
Tansu Akdeniz Community Leader Aug 25, 2022

Hi @hiltonriddex 

Welcome to the community.

It seems you are not using Jira Service Management Rest Api. Please check this doc.

Sample:

{
"serviceDeskId": "10",
"requestTypeId": "25",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new mouse for my Mac"
},
"requestParticipants": [
"john"
]
}

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events