Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,383
Community Members
 
Community Events
168
Community Groups

Update status in Zephyr using Rest API

Hi,

How to get the issue ID using rest API and how to update the status of an issue using the same?

I did refer all the previous posts but couldn't find anything that works.

Thanks

1 answer

0 votes
Bibek Behera Community Leader Apr 07, 2021

Hi @Guha Shree Priya Gopalakrishnan ,

Please use the below api:

https://zfjcloud.docs.apiary.io/#reference/execution/update-execution/update-execution

Ex:

https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/execution/9196ca17-90d2-45c1-aeb9-4aad2d32a47d

Method: PUT

Payload:

{
"status":{"id":1},

"id":"9196ca17-90d2-45c1-aeb9-4aad2d32a47d",

"projectId":13501,"issueId":77077,

"cycleId":"454e11e3-bb4f-4b50-bed2-ebceda5b6dca",

"versionId":11800
}

 

The issue ID can be gathered during the edit operation from the UI. You have to mouse hover the options and the ID will be on the bottom left. Adding screenshot for the same.

ID.PNG

Hi @Bibek Behera 

Thanks for the quick response.

Please could you also tell me how to get the execution ID?

In the example, you have mentioned this execution ID - 9196ca17-90d2-45c1-aeb9-4aad2d32a47d. How do we derive this?

I have cycle ID, version ID and project ID.. now want this execution ID.

Thanks in advance!

Bibek Behera Community Leader Apr 07, 2021

@Guha Shree Priya Gopalakrishnan ,

 

You can get it from the execution page.

 

Please vote and accept the solution so that it can help other too 😀ID.PNG

@Bibek Behera 

Is it possible to get this via a GET method as it'll be difficult to get the issue ID and  execution ID like this during runtime and then use this as a parameter to PUT method to update status.

Any way available to get them via REST API?

Thanks.

Hi  @Bibek Behera 

Is there any way for the above request? I'm currently stuck at this step.

Also I get the below error while trying to update the status as per your suggestion.

Expecting claim 'qsh' to have value 'a163b652a4efa04b91c453571fdc134cf46bf59b7499e1bd5420111a40c18f68' but instead it has the value '023ff86e66bc656e8ed9d65026e519067fbf915b2ed83fbdc37465321dbd085a'

Am I missing anything here?

Thanks!

Hi @Bibek Behera 

The following request throws the below error. Could you please suggest a solution.

https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/execution/afcf0c97-47a7-4d64-a367-e67df298b953

Method: PUT

Payload:

{
"status":{"id":1},
"id":"afcf0c97-47a7-4d64-a367-e67df298b953",
"projectId":10162,
"issueId":127935,
"cycleId":"caa6a3ee-6e24-46b2-bb35-e1e2900706e0",
"versionId":-1
}

Thanks in advance!Image2.jpgImage1.jpg

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events