Hello,
I want to retrieve, and update the execution status of a Test Execution in JIRA using REST API. My Jira and Xray are hosting in Jira Cloud.
Could you point me to a working example how to do that. I am looking at https://developer.atlassian.com/cloud/jira/platform/rest/v2/
I am using POSTMAN to compose and send the Request to mydomain.atlassian.net.
There are 14 Passed, 1 Failed in the Test Execution (TEST-key123)
1. I can only do a GET https://mydomain.atlassian.net/rest/api/3/TEST-Key123 with Status:200K
2. I can not filter the status=FAILED. The response is the same at item 1. Is this filter correct?
GET https://mydomain.atlassian.net/rest/api/3/TEST-Key123?filter=status=FAILED
3. How can I do a POST to update the status of the FAILED to move it back to TODO.
POST https://mydomain.atlassian.net/rest/api/3/TEST-Key123
Helps are greatly appreciate.
Thanks
Sam
For your "can't filter": Get Issue is not used to get a list of issues. You will need to do a "Get Issue Picker Suggestions" request with the JQL or filter information. This returns a list of issue IDs. Then issue the Get issue on each issue.
Statuses are different from other fields. To change a status, you need to issue send a Transition Issue message.
Hi Doug,
I used JQL which lets me filter out just the FAILED ones. Correct me if I am wrong, JQL seems to just do query, but not update.
But I still can not figure out how to change a status for my Test Execution.
Would you point me to any examples to do the update using JQL.
Thanks again
Sam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
I am not on the Jira Team, but I will try to help.
I suspect that you need to url encode the filter query, so something like
https://mydomain.atlassian.net/rest/api/3/TEST-Key123?filter=status%3DFAILED
I hope that helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Martyn. When I copy the URL to the Browser from POSTMAN, it will add the URL encoding.
I can only retrieve my issue (Type: Test Execution) as a whole. But the filter part still does not work. I used JQL which lets me filter out just the FAILED ones.
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.