Hi, I am unable to install ZAPI on my Jira cloud version.

Atheena Sanam December 29, 2020

When I am trying to install ZAPI in my Jira cloud version an error is occurred. So that, I am stuck with the API integration part.

My requirement:

I need to update the status of test cases in a test cycle through API. In my Jira cloud version, due to the absence of ZAPI plugin an error is happening. I can perform the actions on issues through API calling ("jira/rest/api/3/issue/"). But not able to perform any action on test cycle part. Like, I am not able to create execution id via ("jira/rest/zapi/latest/execution") and also execute the execution. Anyone please help me to sort out this issue.

Also could someone share the steps and code that would allow me to update the test cycle for a given release.

Thanks

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 30, 2020

Start at https://zephyrdocs.atlassian.net/wiki/spaces/ZFJCLOUD/pages/1925120024/REST+API and note the line in the first page that says you no longer need ZAPI to work with the Zephyr REST API

Atheena Sanam December 31, 2020

Hi, 

I have visited the site you have shared and followed the steps as per that. Bu when I am trying to call https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/serverinfo , I am getting an error message as 

Unauthorised: It appears your session has expired. Please reload the page."
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 31, 2020

The token you've used for authorisation has expired, you'll need to log in and get a new one.

Atheena Sanam December 31, 2020

Hi,

I have generated new JWT token and I just tried to fetch general information from zapi api, but getting error Expecting claim 'qsh' to have value '6a7318e89ae7764f433c980cbb57fd240b1884e06679e973d8518b24ac029089' but instead it has the value '9a826e393c52fc74522e694b7bdee21d88f49a4ffd3edf622b4a6f4ab8de592e'. 

Below are the procedures I followed,

1. Generated JWT token

2. Tried to fetch general information using get method and url "https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/serverinfo" and provided zapiAccesskey and JWT token in header field and send request.

3. I am getting the above error after sending the request.

Atheena Sanam December 31, 2020

Could anyone please help me to sort out this issue. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 1, 2021

What are you doing differently to what the docs say about getting the jwt token?  (I ask because the mismatch you are reporting suggests you're looking at different systems or accounts)

Atheena Sanam January 4, 2021

Hi, 

I can able to fetch the test cycle details through api calling (GET method is working fine). For eg : https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/cycles/search?versionId=10001&projectId=10002. Now I am facing issue with POST and PUT method. My intention is use to update the test case status through API Calling.  Please have a look at the steps i have followed.

1. Generated the JWT token for https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/execution/executionId
2. Choose PUT method and provide the url https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/execution/executionId
3. In the header field choose conten-type as application/json , authorisation as JWT token and Access key.
4. In body provided ,
{"status":{"id":1},
"id":"79c32409-a9ac-4b36-8e71-f80f6107ef6f", 
"projectId":10002,"issueId":10056,
"cycleId":"276c706a-7be7-4edc-bbdf-aecdcbcfff6d",
"versionId":10001
}
5.After sending request having the error code 500 as
{
"errorType": "ERROR",
"clientMessage": "We encountered some problems during processing this request. Please try again!",
"errorCode": 104
}

Thank you.

Atheena Sanam January 4, 2021

Hi,

Could you please share the selenium java code or related documents for updating the test case status in Jira based upon the test case status in Selenium framework.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events