Forum Discussion

gat-bryszard's avatar
gat-bryszard
New Contributor
4 years ago

`status` param ignored when creating execution via API

We're adding integration to Zephyr Squad via API. According to the documentation for the `create_execution` endpoint, we should be able to pass the parameter `status`, as an Object and set it to whatever value we want. We wanted to have this attribute set to "WIP". However, this parameter is simply ignored. 

These are the bodies of the request that were tested:

'{"status":{"id":3},"projectId":10000,"issueId":10050,"versionId":-1,"cycleId":-1}' # supposed to be the right one


'{"status":{"name":"WIP"},"projectId":10000,"issueId":10050,"versionId":-1,"cycleId":-1}'
'{"status":{"name":"WIP","id":3},"projectId":10000,"issueId":10050,"versionId":-1,"cycleId":-1}'
'{"status":3,"projectId":10000,"issueId":10050,"versionId":-1,"cycleId":-1}'
'{"status":{"id":1},"projectId":10000,"issueId":10050,"versionId":-1,"cycleId":-1}'


Neither of the above worked and each time in response we were getting an execution with the status "UNEXECUTED":

... "status":{"name":"UNEXECUTED","id":-1...


Is there something we can do to make it work? Temporarily we'll be using a second call to update the created execution on the `update_execution` endpoint.



  • fpedroza's avatar
    fpedroza
    Occasional Contributor

    I too am trying to create executions using the same endpoint.

     

    Here's an example of the request payload I'm sending:

    {
    "versionId" : 35633,
    "issueId" : "AMP-1207",
    "cycleId" : "5932d36c-03da-44b2-ae74-40655ba71dd0",
    "projectId" : 17166,
    "status" : { "id" : 1 }
    }

     However the response I get (with a 500 response code) is:

    {
    "errorType" : "ERROR",
    "errorCode" : 104,
    "clientMessage" : "We encountered some problems during processing this request. Please try again!"
    }

     

      • fpedroza's avatar
        fpedroza
        Occasional Contributor

        I've realized that the issue I was having had to do with this:

        "issueId" : "AMP-1207",

        I was passing the issueKey value instead of the issueId value. 

        -1 for acceptable error messages.

  • Chilenny's avatar
    Chilenny
    New Contributor

    I am having the same issue where the result is being ignored and status is UNEXECUTED. Has this been resolved for anyone?