How do I extract all issue types from a project using the REST API?

Harry Anderson April 17, 2019

Am currently using:

rest/servicedeskapi/servicedesk/{id}/requesttype

But this only returns "Service Request" request types. I want to pull back all the Request types we used, including "Incidents" and "Service Request with Approvals".

2 answers

0 votes
John Fetzik
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 18, 2019

I am new to the REST stuff, but it looks like you have the wrong URL. The documentation here looks like it has two different URL's. One that matches yours, but a different one in the actual code examples in the Requesttype section.

I think the correct format is /rest/servicedeskapi/requesttype or /rest/servicedeskapi/{id}/requesttype.

edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 18, 2019

Correct, one returns issue types and the other request types.

0 votes
edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 18, 2019

Hi @Harry Anderson ,

For that you'll use getProject

/rest/api/2/project/{projectIdOrKey}

and then parse for issueTypes

Suggest an answer

Log in or Sign up to answer