Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

hiltonriddex August 25, 2022

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
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 25, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 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
AUG Leaders

Atlassian Community Events