Issyetypescheme API call is not returning all the components

Khushal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 3, 2024

As per the documentation of this API call we should receive an output which contains the list of issue types under a scheme, but when I make the same call it only returns the self object and no issue types:

Call: https://docs.atlassian.com/software/jira/docs/api/REST/9.4.0/#api/2/issuetypescheme-getIssueTypeScheme

Output recevied:

{
  "expand": "defaultIssueType,issueTypes",
  "self": "https://jira-test-aws.mathworks.com/rest/api/2/issuetypescheme/20501",
  "id": "20501",
  "name": "IT: Story+Task+Bug+X-Ray Type Scheme ",
  "description": "test "
}


The scheme has 8 issue types and is being used for 19 projects, so as per the schema of the above API call we expected that the issue types information will be shown. 

Has any one faced this issue? 

I am an admin of the system and am making this GET call directly in the browser URL.



1 answer

1 accepted

1 vote
Answer accepted
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 5, 2024

Hi @Khushal 

try adding expand query parameter, expand=defaultIssueType,issueTypes

It should work this way

/rest/api/2/issuetypescheme/{schemeId}?expand=defaultIssueType,issueTypes

Khushal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2024

Thank you that worked exactly as I had hoped. Another question I had is that if there are similar query parameters to restrict? 

For example: rest/api/2/project/{projectKey}

I only want the "components" and "versions" to be returned and not all the other attributes? 

(I read that for issue search you can control by using the fields parameter, but what about other objects)

Suggest an answer

Log in or Sign up to answer