This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PUT example updating custom phase

Hello, i would like to update phases via Rest API. It is easy when it comes to system phases, but it gets quite complicate when they are custom. Id are there but it is not possible to know which phase exactly it is. Do you have maybe a PUT example on a defect?

thanks

Laurent

  • 0

    Hi Laurent, you can use this to get a list of all phases for defects, with IDs and Names so that you will be able to match a custom phase's display name and its ID:

    GET

    {{url}}/api/shared_spaces/{{shared_space}}/workspaces/{{workspace}}/phases?query="entity='defect'"&fields=name,logical_name,id,workspace_id,entity

    To update the phase of a defect:

    PUT

    {{url}}/api/shared_spaces/{{shared_space}}/workspaces/{{workspace}}/defects/{{defect_id}}

    and as body:

    {
    "phase":{
    "type":"phase",
    "id":"phase.defect.opened"
    }
    }
    Please let me know if this solves your problem.
    Raul.