Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Using /rest/api/3/search to return IssueType

Hi,

I am using the above endpoint to return issues via a JQL query, however, no matter what I try I cannot persuade it to return the issue type.

{
"expand": [
"names",
"schema",
"operations"
],
"fields": [
"summary",
"status",
"assignee",
"priority",
"reporter",
"issuetype"
],
"fieldsByKeys": false,
"jql": "...snip!",
"maxResults": 1,
"startAt": 0
}

The data returned when posting the above is correct, but the issuetype is not returned in the "fields" array.

If I use the /rest/api/3/search?jql=project=IXPHD&expand=names endpoint then I receive the issuetype field as expected.

"issuetype": {
"self": "https://*.atlassian.net/rest/api/3/issuetype/10001",
"id": "10001",
"description": "A problem which impairs or prevents the functions of the product.",
"iconUrl": "https://*.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10512?size=medium",
"name": "Bug",
"subtask": false,
"avatarId": 10512,
"hierarchyLevel": 0
},

So, is there a way to return that field data from the search endpoint? I'm probably missing something simple but I just cannot work out what :)

Thank you!

2 answers

2 votes
Alex Ortiz
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.
Sep 23, 2023

@John Young The issue type isn't going to be returned by the name that you are expecting (like epic, story, task, etc), instead, you'll get a number by the "id" which represents the under the hood of the issue type identification number.  Hope this helps!

apiIssueType.jpg

Thank you, can you show the post json data you used for that response? (note I used POST. , not GET)

1 vote
Bill Sheboy
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.
Sep 23, 2023

Hi @John Young 

Did you supply JQL when you called it in your first example, as those results seem to be from another endpoint?

Please look here to learn what is possible with the issue search using JQL one:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-get

Kind regards,
Bill

Yes, my JQL is fine, I just did not show it because it was long heh.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events