It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to update the execution status of 'Test' type issues and test steps using ZAPI ?


I am currently trying to use ZAPI to update execution status of issues (for example, updating it from UNEXECUTED to PASSED).

Unfortunately, all my tries have been unsuccessful.

Could you indicate me the different steps I need to fill or maybe an example of what to do to update those execution statuses ?




4 answers

1 accepted

Hi Adrien,

To update execution status of issues, you have to follow the below steps.

  • Use Get all executions by Issue ID API which gives all executions of that issue with id's as result

GET - http://localhost:8080/rest/zapi/latest/execution?issueId=113884
  • Use the execution id's from the above result to update the status of that execution using the below API

PUT - http://localhost:8080/rest/zapi/latest/execution/16944/execute
Request Body :
"status" : 2

If you still not able to update the status or have any issues using API, please submit a case through our support portal On this page register and click on Submit a case icon to create a support ticket.


Zephyr Support

I am still getting an error: how did you derrive:issueId=113884

sorry but i am new to Zephyr

i use Advance rest client extension in chrom to send request

below is the response

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Oops, you&#39;ve found a dead link. - JIRA</title><script type="text/javascript">contextPath = "";</script><link type='text/css' rel='stylesheet' href='/static-assets/metal-all.css' media='all'><script src='/static-assets/metal-all.js'></script><!--[if lt IE 9]><link type='text/css' rel='stylesheet' href='/static-assets/metal-all-ie.css' media='all'><script src='/static-assets/metal-all-ie.js'></script><![endif]--><!--[if IE 9]><link type='text/css' rel='stylesheet' href='/static-assets/metal-all-ie9.css' media='all'><![endif]--><meta name="decorator" content="none" /></head><body class=" error-page error404"><script type="text/javascript">document.body.className += " js-enabled";</script><div id="page"><header id="header" role="banner"></header><!-- #header --><section id="content" role="main"><div class="aui-page-panel"><div class="aui-page-panel-inner"><section class="aui-page-panel-content lowerContent"><div id="error-state"><span class="error-type"></span><h1>Oops, you&#39;ve found a dead link.</h1><ul><li>Go back to the <a href="javascript&colon;window.history.back()">previous page</a></li><li>Go to the <a href="/secure/MyJiraHome.jspa">Home Page</a></li></ul></div></section><!-- .aui-page-panel-content --></div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel --></section><!-- #content --><footer id="footer" role="contentinfo"><section class="footer-body">

<ul class="atlassian-footer">
Atlassian JIRA <a class="seo-link" href="">Project Management Software</a>

<span id="footer-build-information">(v6.3.15#6346-<span title='dbc023dd75cecacf443c4b235f66124b15f5c5fe' data-commit-id='dbc023dd75cecacf443c4b235f66124b15f5c5fe}'>sha1:dbc023d</span>)</span>
<a id="about-link" href="/secure/AboutPage.jspa">About JIRA</a>
<a id="footer-report-problem-link" href="/secure/CreateIssue!default.jspa">Report a problem</a>
<div id="footer-logo"><a href="">Atlassian</a></div></section></footer><!-- #footer --></div><!-- #page --></body></html>

Worked. Thank you for your help !



I have tried this approach several times but I keep getting an error response message:



  "error": "Error in creating Execution, please check value of 10744 and retry"



Any help would be greatly appreciated.

GET - http://localhost:8080/rest/zapi/latest/execution?issueId=113884
  • Use the execution id's from the above result to update the status of that execution using the below API

PUT - http://localhost:8080/rest/zapi/latest/execution/16944/execute
Request Body :
"status" : 2

"16944" must be the id of test execution and not any other id. You are supplying a wrong a test execution id

NOTE: IssueId= 113884 is the Test id here and "16944" is the test execution Id.

I am using the approach told by you and it is not working for me. This is the output that I am getting.


HTTP/1.1 405 Method Not Allowed
X-AREQUESTID: 659x6848x1
X-ASEN: SEN-L10209903
Set-Cookie: JSESSIONID=B3AF12B5CE2DF309984364292E256520;path=/;HttpOnly
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=B3V4-FQVS-53YI-3FBV|e86b4eba01681208430efe329935d48938583151|lin;path=/
X-Content-Type-Options: nosniff
Content-Encoding: gzip
Vary: User-Agent
Content-Type: text/html;charset=UTF-8
Date: Tue, 29 Aug 2017 05:29:16 GMT
X-Cache: MISS from damco.local.localdomain
X-Cache-Lookup: MISS from damco.local.localdomain:3128
Transfer-Encoding: chunked
Via: 1.1 damco.local.localdomain (squid/3.5.20)
Connection: keep-alive


Help on this will be apprecaited.

Check the method you are using, you might be using "get". change it to "put" to update the results.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Apr 03, 2019 in Marketplace Apps

How to estimate projects more accurately?

Gaining insight into your team’s effectiveness and choosing the right estimation technique.   Estimating projects is hard. It is because people have the tendency to underestimate the time thin...

288 views 2 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you