Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to get the request type key on Jira Cloud?

Alice van Wouw
Contributor
July 9, 2019

We have a system that connects to Jira Cloud and one of the use cases requires the creation of a Service Desk Issue with a specific request type. Up till now we have gone through the activeobjects.xml from the backup to get the uuid/key of the request type. We want to programmatically set the request type based off a list of current request type uuids.  

 

"/rest/servicedesk/{serviceDeskId}/servicedesk/request/{issueId}/request-types

 

The above API allows us to get a list of request types with the key, however, it is an internal API and, therefor, cannot be used by a plugin (without username and password). 

 

"/rest/servicedeskapi/servicedesk/5/requesttype/1"

 

This is the offical API for Service Desk to get request types,  however, it does not return the request type's key. 

 

Any advice would be greatly appreciated. 

 

 

1 answer

1 accepted

3 votes
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 10, 2019

Hi @Alice van Wouw ,

Please review below HowTo:

In there it is mentioned: 

the correct (and easiest) way to create a Jira Service Desk request via REST API is to use the Jira Service Desk Cloud REST API 'request' endpoint/rest/servicedeskapi/request

 

However, in case you need to use the Jira Core /rest/api/2/issue endpoint, then that's actually the only way to get the request-type key in Jira Cloud.

Can you kindly let us know the use-case why you cannot use the JSD endpoint /rest/servicedeskapi/request?

 

Finally, you may want to watch and vote for the below Feature Request asking to have the requesttype REST API endpoint for JSD to also return the request type Keys:

 

I hope this helps.

 

Cheers,
Dario

Alice van Wouw
Contributor
July 12, 2019

Hi Dario, 

Thank you so much for your response! We were able to use the Service Desk Cloud Rest API as you suggested and it worked! 

 

We had methods in place to use the generic Issue creation API however it turned out to be more beneficial to use the API as you suggested.

Thanks again!

Like # people like this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2019

You are very welcome @Alice van Wouw , I am happy to know this helped! :)

have a nice weekend,

Dario

Suggest an answer

Log in or Sign up to answer