Forums

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

Issue in response of API "Search for issues using JQL (GET)" (GET /rest/api/3/search)

shreya garg
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!
September 16, 2020

Using API "Search for issues using JQL (GET)" (GET /rest/api/3/search)

There is an issue in the response of the above-mentioned API, it returns a certain number of fields which has been named as "customfield" 

So it would be really helpful if you provide the mapping for the same with the name that can be helpful to understand the response whether its an epic, story, bug or so on for any of the possibilities.

Examples :

 "customfield_10060": null,
"customfield_10061": null,
"customfield_10062": null,
"customfield_10063": null,
"customfield_10064": null,
"customfield_10065": null,
"customfield_10066": null,

"fields_customfield_10000":{pullrequest={dataType=pullrequest, state=MERGED, stateCount=1}, json={"cachedValue":{"errors":[],"summary":{"pullrequest":{"overall":{"count":1,"lastUpdated":"2020-09-15T21:10:31.000+0530","stateCount":1,"state":"MERGED","dataType":"pullrequest","open":false},"byInstanceType":{"GitHub":{"count":1,"name":"GitHub"}}}}},"isStale":true}}

"fields_customfield_10010" :[{'id': 304, 'name': 'Sprint 52', 'state': 'active', 'boardId': 2, 'goal': '', 'startDate': '2020-09-08T05:26:09.089Z', 'endDate': '2020-09-21T05:26:00.000Z'}]

Thanks in advance, looking forward to hearing from you.

1 answer

0 votes
Rudy Holtkamp
Community Champion
September 17, 2020

Hi @shreya garg ,

If you take a closer look at your output data (not the snippet data you posted above), you should see this section:

"issuetype": 
{
"self": "https://yourjira.atlassian.net/rest/api/3/issuetype/10000",
"id": "10000",
"description": "A big user story that needs to be broken down. Created by Jira Software - do not edit or delete.",
"iconUrl": "https://your.atlassian.net/images/icons/issuetypes/epic.svg",
"name": "Epic",
"subtask": false
},

But if you are only looking for epics, you might use this endpoint: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-get

 Where you can specify a JQL: issuetype = Epic

Rudy

Suggest an answer

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

Atlassian Community Events