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
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
You are sending the body as form data, please send the data as raw >>JSON, it will work
url:
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"}
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.