Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Zephyr Rest Api error 104

Deleted user March 31, 2020

Hi,
I'm using zephyr for Jira Cloud.  
I have not made any modifications to my rest api code, but I just started to see my test to add a cycle fail.  

When I do manually add a cycle I'm able to do it through [company].atlassian.net.
I'm doing a
POST
url: 'https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/cycle?clonedCycleId=[id here]'
name: 'TestCycle',
projectId: 10000,
versionId: -1
I'm passing the correct credentials but nothing is working.  

I have cleared from zephyr general configuration

  • Clearing Server Cache

I see the following error response 
body: {
errorType: 'ERROR',
clientMessage: 'We encountered some problems during processing this request. Please try again!',
errorCode: 104
}
Please help I'm going nuts trying to figure out what is wrong

2 answers

1 vote
jagadeesh madhura
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.
March 31, 2020

You are sending the body as form data, please send the data as  raw >>JSON, it will work

 

url:

https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/cycle?expand=&clonedCycleId=587a588a-d22f-420b-895a-6a0108e7f464

body:

{"name":"apI - Sample1 ","versionId":-1,"projectId":12105}

 

Headers:

Content-Type : application/json

Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NTcwNTg6NjIxYzVmM2QtNWQ1Yi00MGQ2LTg1ZTgtMDAwNWY5MzM0OWM2IiwicXNoIjoiYzcyMTVjZDRmMGQ5NWI5M2RiZGQ5NzM3MzAxNGQwODk2ZmY4YTE5YjExNmYyYjFlYThmMzhhZGMyN2VmYjRlMCIsImlzcyI6ImFtbHlZVHBrWVRjd01UZGxZeTAzTWpJeExUUXpNVGt0WW1RMk5DMWlNREU0WXpsbU5tUTVOamdnTlRVM01EVTRKVE5CTmpJeFl6Vm1NMlF0TldRMVlpMDBNR1EyTFRnMVpUZ3RNREF3TldZNU16TTBPV00ySUZWVFJWSmZSRVZHUVZWTVZGOU9RVTFGIiwiZXhwIjoxNjIxNzE0ODgxLCJpYXQiOjE1ODU3MTQ4ODF9.IGt8sHS7euovrD-cy8FyJgeNbZdA5Pmp7kpxBiW0zmY

ZapiAccessKey: amlyYTpkYTcwMTdlYy03MjIxLTQzMTktYmQ2NC1iMDE4YzlmNmQ5NjggNTU3MDU4JTNBNjIxYzVmM2QtNWQ1Yi00MGQ2LTg1ZTgtMDAwNWY5MzM0OWM2IFVTRVJfREVGQVVMVF9OQU1F

Sample output:

{    "versionId": -1,    "folders": [],    "createdByAccountId": "557058:621c5f3d-5d5b-40d6-85e8-0005f93349c6",    "createdBy": "557058:621c5f3d-5d5b-40d6-85e8-0005f93349c6",    "orderId": 25,    "name": "apI - Sample1 ",    "cycleIndex": "3f820a1e-4389-4bbb-a423-5724f4d6290f",    "id": "3f820a1e-4389-4bbb-a423-5724f4d6290f",    "creationDate": 1585715233099,    "projectId": 12105,    "projectCycleVersionIndex": "12105_-1"}

David von Edge
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 14, 2020

I have this same problem, and I am already sending the body as raw json.

I started by using https://www.npmjs.com/package/zephyr_api. Looking at the source, the lib is creating raw json for requests.

Most requests I have tried so far work, but the request to create an execution (POST to connect/public/rest/api/1.0/execution) returns errorCode 104.

As you pointed out in the other thread, if I identify assignee by something other than accountId, I get 401 error instead.

David von Edge
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 14, 2020

Correction: the POST to generate a new executionID succeeded. The PUT to update the data on the new executionID is what is responding with a 104.

0 votes
Deleted user April 1, 2020

The error has to do with atlassian now using accountId because of GDPR changes.
https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/?_ga=2.245358469.1036723875.1585618387-392302479.1585618387


I had to revise my JWT token to include [notice the fix was to include accountId in sub]


var payload = {
"sub": ACCOUNT_ID,
"qsh": QSH,
"iss": ACCESS_KEY,
"iat": IAT,
"exp": EXP
};



what helped me in getting account id in jira was to export all users and accountid is the first column or you can try:
https://community.atlassian.com/t5/Confluence-questions/Get-user-account-ID-via-API-from-email-username/qaq-p/1197704

jagadeesh madhura
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.
April 1, 2020

I believe if jwt is wrong you will get 401 error, I got 104 error when I pass the body as form data

Yes youh to use accountId for jwt generation as a part of JIRA GDPR changes and zephyr for jira cloud is already compatible with Jira GDPR changes

Please refer below link to generate jwt using account ID

https://github.com/zephyrdeveloper/zapi-cloud/blob/master/generator/java/src/main/java/com/thed/zephyr/cloud/rest/ZFJCloudRestClient.java

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events