Zephyr Jira plugin REST API

rag van March 21, 2013

Does Zephyr plugin come with REST API?

18 answers

1 accepted

3 votes
Answer accepted
rag van March 21, 2013

Found it and here is how you get to it http://<jiraurl>/rest/zephyr/1.0/application.wadl</span<>>

Sergey S Makeenkov March 21, 2013

Do you know how use it? I need only change status of execute.

Like # people like this
Lakshmi Tejas M A October 15, 2020

yes how to change the execution status?

Like Shinju Saseendran likes this
2 votes
vladimir October 23, 2013

Are you kidding us? That's sad i can't get money back for Zephyr.

If someone want just to update statuses in zephyr and does not have 1500 bucks you can use my example - we have it working.

I am ashamed, i asked my company to buy Zephyr for JIRA and now i feel myself dumbass.

rag van October 23, 2013

Lets wait for Chris to answer. May be I read it incorrectly. :-)

ErikB October 23, 2013

Yep, access to the API now costs extra. I share the frustration, but also because the long awaited 2.0 had little to none of the basic improvements everyone has been asking for forever like a delete confirmation on test steps, test step audit trail (apparently available in admin, but that's no good for users to view history if they accidentally delete a step), expandable test step text areas, wiki markup support - usability improvements in general.

Instead, they chose to lock down a feature that was previously included and begin charging for it. Head scratcher. But at least there's 6 months of free trial available to check out zapi and wait to see if the front-end is improved by then. Still, the chosen business model of charging extra for api access is... well... curious.

2 votes
rag van March 24, 2013

here is the data format to post for test step status

{"id":31,"status":"2","htmlComment":"","scheduleId":18,"stepId":31,"readableDefectList":""}

post it to http://<jiraurl>/rest/zephyr/latest/stepresult/{id}>

where id is stepid. status 2 means fail 1 means pass.. this is a PUT service

easy way to figure out what to post or put to which link is to create a sample project and execute the test cases in firefox with firbug plugin to watch the NET activity. it would give you url to hit and data to send

1 vote
Sergey Zaytsev October 28, 2013

More over, in my humble opinion, current ZAPI features are all we expected Zephyr API to be - transparent and clean. Definitely - all current integrations are demand redesign.

As far as I can see, now all testCycle manipulations are not ridiculously hidden in places like _schedulers_ ( was an awful decision ) and could be found in a moment !

Good work ! 'll try it asap !)))

1 vote
vladimir October 3, 2013

Put in wadl/ https://<your jira>/rest/zephyr/1.0/application.wadl

<plugin>
<groupId>org.jvnet.ws.wadl</groupId>
<artifactId>wadl-client-plugin</artifactId>
<version>1.1.5</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDirectory>wadl</sourceDirectory>
<packageName>com.amdocs.css.vip.zephyr</packageName>
</configuration>
</plugin>

http://yadi.sk/d/w69Sul1XANw5R

You can use this to change execution status for TestCase or TestStep.

This should be really simple, you can use your IssueKey for input.

0 votes
rag van June 10, 2014

can check if following url first works?. also describe what you are trying to do. some things are not possible through API and will need direct table hit. Not many tables though and its easy schema

http://<jira_server>/rest/zephyr/1.0/application.wadl

0 votes
vladimir June 10, 2014

We can't find the way.

But there are some possible solutions

1) downgrade to previous version

2) buy ZAPI (i know - it's not fair - because in future they can divide ZAPI into two module and try to sell them separately) it might be mistake to pay them money

3) get access to DB directly and do whatever you want to do, i've investigated this and this was our backup plan.

But our company prefer to buy ZAPI.

0 votes
Geethanjali Rajendran June 9, 2014

I tried to access test steps of a test case using the URL https://<jira_server>/rest/zapi/latest/teststep/<issueId>

When I tried to access from browser, I always get 404 not found error message. Can some one confirm if this is the correct API to use to access the test steps?

I am sure that I am using the correct issueId in the URL

Indra S November 28, 2018

Yes, i have written a java code for integrating Zephyr with Jira using ZAPI. If you really need that java code then i will share.

Like Jayakumar Samy likes this
Sandra Milena Arias Reyes November 4, 2020

Hello, I have the same problem: Error 404 Not Found

I want to add steps to a test case that I have already created in JIRA:

 

POST: https://jira.XXXXXXX.com:XXX/rest/zapi/latest/teststep/AUT-62

 

BODY:

{    

"step" : "Check for schedule count",    

"data" : "filter id",    }

"result" : "count should be equal to schedules returned by this filter."

0 votes
Chris Miller
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.
October 28, 2013

Vladimir,

This is correct. After upgrading to Zephyr for JIRA 2.0.x, you will need the ZAPI plugin to do any API manipulation. API calls that may have been figured out for Zephyr for JIRA 1.7 and earlier will not work anymore.

Kind Regards,

Chris

rag van December 5, 2013

Chirs, we went ahead and bought the zapi and isntalled. when we try to use below url, getting an empty response {}. When I look at response, its 403 error. I am using the generic rea user that use for calling all Jira api's. this user has permissions to all projects as read only. So the question is, to use the api, should the user be admin?

https://jiraserver/rest/zapi/latest/util/project-list</span<>>

Daniel
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.
December 8, 2013

rag van,

Can you paste your code in a comment so we can take a look at it? I'm using mine in python and its working fine, with my read-only user.

Regards,

Daniel

Geethanjali Rajendran June 10, 2014

I use the URL from browser as well as tried a CURL request for the URL "https://jiraserver/rest/zapi/latest/util/project-list>" , I am getting only the empty response.

Is it mandatory to install the zapi pluggin even if the project which I am using is upgraded to the latest zephyr?

Geethanjali Rajendran June 10, 2014

Heard from my team that ZAPI is commercial. In that case, can we use the old zephyr API? Even that is not working for me.

Is there some way to get this working?

0 votes
Chris Miller
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.
October 24, 2013

Try out:

http://developer.yourzephyr.com/zapi/index.php

Which includes this interactive area:

http://docs.getzephyr.apiary.io/

Kind Regards,

Chris

vladimir October 28, 2013

Ok, as far as i can see - these API will not work without ZAPI plugin - is it correct?

0 votes
Chris Miller
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.
October 23, 2013

ZAPI unlocks new functionality especially around automation and CI integration, plus other integrations planned for the future. Not all customers need this functionality and hence we have separated it from the main Zephyr for JIRA. Our test management solutions on the Marketplace are already very reasonably priced for the amount of functionality that they provide and the cost per user is extremely low compared to a host of other solutions. We continue to spend time and resources to enhance our products and hope they continue to provide real good value to our customers.

Kind Regards,

Chris

Sergey Zaytsev October 23, 2013

Chris, sorry me fo so may be dummy question but anyway - what is the _url_ for _wadl_ for zephyr for jira 2 plugin in order to see REST definitions. And same about ZAPI.

Thank you with all respect!

0 votes
Chris Miller
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.
October 23, 2013

You may have already heard it was coming. I can now say ZAPI has arrived:

https://marketplace.atlassian.com/plugins/com.thed.zephyr.zapi

Kind Regards,

Chris

rag van October 23, 2013

Much awaited. But looks like its not included in Zephyr license and sold seperately at 1/3 of actual plugin license. Is that correct? interesting model

0 votes
Sergey Zaytsev September 12, 2013

How could I know what values must be provided for cycleId, issueId and other parameters ? I mean, consider someone has created a TestCycle, added couple Tests in to it ?After that decided to call REST services, and for those services values for cycleId, issueId and other params are needed ? Where can we get them ?

0 votes
Sergey S Makeenkov March 24, 2013

For test API i used RESTClient add-on.

I send to URL https://<jiraurl>/rest/zephyr/latest/schedule/17/execute PUT-request with {"status":"1"}

Where 17 is execute id of TestCase from TestCycle.

Result on printscreen

rag van March 24, 2013

so that worked out for you as I see 200 status???. what was the reponse body?

Sergey S Makeenkov March 24, 2013

Status of execute was changed after i sent request.

Body

  1. {
  2. "summary": "Test that function "xxxxxxx" modify record",
  3. "executedOn": "Today 16:21",
  4. "cycleName": "01.30.204 TestPlan",
  5. "cycleID": 3,
  6. "label": "WebGate",
  7. "issueId": 89745,
  8. "versionName": "01.30.204",
  9. "issueID": 89745,
  10. "executedByDisplay": "Sergey Makeenkov",
  11. "executionStatus": "1",
  12. "projectID": 10010,
  13. "htmlComment": "",
  14. "executedBy": "sergey.makeenkov",
  15. "component": "",
  16. "versionID": 17662,
  17. "issueKey": "WB-975",
  18. "scheduleID": 17,
  19. "comment": ""
  20. }
rag van March 25, 2013

wanted to share this information for anyone planning to use the API. Zephyr support was very responsive to my quries and gave below information. So use current API with some risk factor

These are not officially supported APIs. That being said, Zephyr support will not be able to assist you with their use. There is no documentation for these APIs. As well, we reserve the right to make changes to these APIs in future releases of Zephyr for JIRA without any warning

0 votes
Sergey S Makeenkov March 21, 2013

I try to make changes use DB...

rag van March 22, 2013

there are multiple categories of services under above link. Two of them /stepresult and /teststep deal with teststep

I think you have use /stepresult/createstepresult or /stepresult/{id}/quickexecute to change the status. I am still trying to execute each one to understand how to use. get methods are working fine. post and put methods are missing needed input format and figuring out one by one

0 votes
rag van March 21, 2013

Yeah saw that. I am trying to reverse engineer too. So far nothing

0 votes
Sergey S Makeenkov March 21, 2013

Hi Rag Van!

I asked about API support by email. They answer that they work on API. Wait wait wait.

0 votes
Sergey S Makeenkov March 21, 2013

Look at 117310

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events