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

How do i extract only the issuekey from REST API Response

Rahul Aich [Nagra]
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.
June 12, 2015

Hi

I used the REST API to get search results for a JQL.

 But now i want to extract only the issuekey from  the entire response.

How can we do this?

Rahul

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Sheral Hewes June 12, 2015

Add   "%22&fields=key" at the end of the rest call.  I call this is a php script.

Example: 

 $url = "https://" . $this->jiraUser . ":" . $this->jiraPassword . "@" . $this->jiraBaseUrl . "/rest/api/latest/search?maxResults=" . $this->jiraMaxResults . "&jql=category=DEV+AND+Project%20not%20in%20%28EDI,%20Reports%29%20AND%20type%20in%20%28Bug,%20Improvement,%20%22DEV%20Sub-Task%22%29%20AND%20status%20was%20in%20%28%22Ready%20for%20Certification%22%29%20AND%20status%20in%20%28Resolved%29%20AND%20resolved%20%3E=%22" . $BeginDate . "%22AND%20resolved%20%3C=%22" . $EndDate . "%22&fields=key";

Alexej Geldt
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.
June 15, 2015

correct. Just add fields condition to your jql.

TAGS
AUG Leaders

Atlassian Community Events