JIRA REST API - how to request a problem status name

I am using the JIRA REST API, and I would like to request all the problems in the "Resolved" status. The status field is as follows:

"status": { "self": "https:\/\/jira.atlas.xx.com\/rest\/api\/2\/status\/5", "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "iconUrl": "https:\/\/jira.atlas.xx.com\/images\/icons\/statuses\/resolved.png", "name": "Resolved", "id": "5", "statusCategory": { "self": "https:\/\/jira.atlas.xx.com\/rest\/api\/2\/statuscategory\/3", "id": 3, "key": "done", "colorName": "green", "name": "Complete" } } 

Currently, the only way to find out is to request status = 5. It would be nice to make the request more intuitive and look for all problems using the "Allowed" status line. Here is the query I'm using:

 https://jira.atlas.xx.com/rest/api/2/search?jql=project=MYPROJECT and status=5 and fixVersion=15824&fields=id,key,description,status 

Can I request a status name?

+5
source share
2 answers

Yes, you can also request a status name.

I think you should use the official Jira documentation, especially this when using advanced search options such as JQL queries.

This documentation describes every part of your possible JQL queries. If you look at the Fields reference section, there you will find the fields, as well as possible attributes that you can search for. For example, in the case of Status :

 You can search by Status name or Status ID (ie the number that JIRA automatically allocates to a Status). 

Accordingly, your request can be easily changed.

 https://jira.atlas.xx.com/rest/api/2/search?jql=project=MYPROJECT and status=Resolved and fixVersion=15824&fields=id,key,description,status 
+6
source

If you can enter JQL in the browser, you can use it as a string for the REST API search resource. So you can really search by status name matching quoted

+2
source

Source: https://habr.com/ru/post/1201605/


All Articles