Hi All,
My Scenario is:: I want to retrieve all the issues that are having the custom field (Alert ID Hex) and its value as "Alert ID Hex = ABCD" and status as "Cancelled".
To satisfy the above case i used the below endpoint and JQL query.
URL: https://neustar-sandbox-375.atlassian.net/rest/api/3/search?
Method: Get
Payload::
jql=project=OneDev AND customfield_10651 = ABC AND status=cancelled&fields=key
But in the response, i couldn't see the issues.
Could you please correct me with the payload and any other required changes to all the issues that matches with the case?
I want to get only the issue keys and apart form this i don't want any other data to be populate in the response code.
Hi,
Unfortunately what you' re asking is not possible in the API. Even when asking for only field=key, you will always get a response like this:
{
"expand": "schema,names",
"startAt": 0,
"maxResults": 50,
"total": 105,
"issues": [
{
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
"id": "10166",
"self": "https://xxx.atlassian.net/rest/api/3/issue/10166",
"key": "SOLV-35"
},
{
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
"id": "10165",
"self": "https://xxx.atlassian.net/rest/api/3/issue/10165",
"key": "SOLV-34"
}
}
The roor json object contains a json array issues. Each issue is an object with minimum some fields (expand, id, self, key). Should not be difficult to parse though.
Hope this helps!
Jeroen
Hi @Jeroen Poismans ,
Thanks for your response.
Do you mean to say that it will populate all the field details? Or only those details that you shared as below will be populated.
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
"id": "10165",
"self": "https://xxx.atlassian.net/rest/api/3/issue/10165",
"key": "SOLV-34"
Could you please confirm if the endpoint and query that I have provided are valid? or do I need to make any changes to get the response just like you shared?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What I shared is the minimum fields you will always get returned. You can get extra fields by providing them in the fields parameter. Omitting the fields parameter will give you the issue with all custom fields.
Your endpoint is correct and the JQL also seems valid too.
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.