Contributions
API - Update Test Cycle - Invalid JSON Error 151
I'm using the API to update Zephyr Squad within JIRA. Whether through my scripting, or directly throughhttps://zephyrsquad.docs.apiary.io/(even using the format of the example body), I'm receiving an Invalid JSON error when updating an existing test cycle - URL:https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/cycle/[CYCLE_ID] Headers: Content-Type (application/json), Authorization (script generated JWT), and zapiAccessKey Body: { "name": "10.11.1.3.1", "build": "10.11.1.3.1", "environment": "auto", "description": "DESCRIPTION", "startDate": "2022-03-02", "endDate": "2022-03-03", "versionId": [VERSION_ID], "projectId": [PROJECT_ID], "id": "[CYCLE_ID]" } Response: content-type:application/json;charset=utf-8 content-length:68 access-control-allow-origin:* access-control-allow-methods:OPTIONS,GET,HEAD,POST,PUT,DELETE,TRACE,CONNECT access-control-expose-headers: access-control-max-age:10 date:Wed, 09 Mar 2022 20:35:09 GMT connection:close { "errorType": "ERROR", "clientMessage": "Invalid Json", "errorCode": 151 } Also tried with the apiary example's"clearCustomFieldsFlag": true and"sprintId": null. Any obvious fields that I'm missing, or formatting issues with the JSON? Many Thanks.511Views0likes0CommentsZephyr Jira Cloud API - Update execution
Hi, I'm trying to update the status and/or comment of a test execution. As recommended through apiary (https://zephyrsquad.docs.apiary.io/#reference/execution/update-execution/update-execution?console=1), I'm doing this through curl, with raw json (--data-binary argument): curl -s -S -k --include --request PUT -H "Content-Type: application/json" -H "Authorization: JWT ${jwt}" -H "zapiAccessKey: ${ZAPI_ACCESS_KEY}" --data-binary "${data}" https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/execution/${execution_id}--write-out "%{http_code}" 2>&1) With "data" being the json request body (sensitive values redacted) = {"status":{"id":3},"id":"[EXECUTION_ID]","projectId":[PROJECT_ID],"issueId":[ISSUE_ID],"cycleId":"[CYCLE_ID]","versionId":[VERSION_ID],"comment":"Test Comment"} And I'm receiving the following error: HTTP/2 500 date: Wed, 03 Nov 2021 14:14:13 GMT content-type: application/json;charset=utf-8 content-length: 134 server: Apache-Coyote/1.1 {"errorType":"ERROR","clientMessage":"We encountered some problems during processing this request. Please try again!","errorCode":104}500 I'm also getting this same error when running it in the Production console on apiary. Up until this point, I've had no issues with GET (for execution lists, cycles, folders, etc.) or POST (creating new folders or tests) requests. Also, the JWT generation and usage has been working fine. If that were the case, I'd expect the "Expecting claim 'qsh' to have value x but instead has the value y" error. So this error is new to me. I've tried every permutation imaginable, I believe I've captured all documented required arguments. Does anything stick out as obviously wrong? The solution for the "Zephyr Cloud API - automated creation of execution" topic had me concerned that it might be a similar documentation error - "From the documentation the cycleId is optional in the cloud API, however in the server API the cycleId is mandatory" https://community.smartbear.com/t5/Zephyr-Squad-Questions/Zephyr-Cloud-API-automated-creation-of-execution/m-p/211313 While that topic was referring to creating a new execution using a POST request, it is the same API url and error message. So I wonder if something similar is happening here. Any help would be greatly appreciated, thank you! Greg980Views0likes1Comment