Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ref-id- In the case of Approval Path for Jira, this is issue id or issue key.

List approvals

GET /approvals/{ref-id}

Return example:

Expand
titleExample response data
Code Block
languagejson
{
  "result": [
    {
      "id": "38",
      "definitionId": "35",
      "name": "Approval Name",
      "summary": "Ticket Summary",
      "collectionId": "10002",
      "refId": "10004",
      "steps": [
        {
          "type": "USER",
          "status": "SUCCESS",
          "userId": "557058:aea7ac02-75c1-4f47-9beb-dd89777d4949",
          "displayName": "Krzysztof Bogdan",
          "avatarUrls": {
            "48x48": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:aea7ac02-75c1-4f47-9beb-dd89777d4949/f795c3d7-bee3-4444-9d39-0b18b81cb20b/48",
            "32x32": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:aea7ac02-75c1-4f47-9beb-dd89777d4949/f795c3d7-bee3-4444-9d39-0b18b81cb20b/32",
            "24x24": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:aea7ac02-75c1-4f47-9beb-dd89777d4949/f795c3d7-bee3-4444-9d39-0b18b81cb20b/24",
            "16x16": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:aea7ac02-75c1-4f47-9beb-dd89777d4949/f795c3d7-bee3-4444-9d39-0b18b81cb20b/16"
          },
          "action": "STARTED",
          "decision": "ACCEPTED",
          "decisionDate": "2021-09-30T13:51:01.676+00:00"
        }
      ],
      "status": "IN_PROGRESS"
    }
  ],
  "totalCount": 1
}

...

Create or get approval

POST /approvals/{ref-id}

Expand
titleExample body
Code Block
languagejson
{
  "definitionId": "id",
  "summary": "Approval summary. Usually issue/page title"
}

...

Reset approval

Allows user to reset ongoing or finalized approval path on an issue.

POST /approvals/{ref-id}/reset

Object: createComment
The “createComment” object, if “True”, will generate a comment when approval path is reset via API. The creator of the API will be specified as the agent.

Expand
titleExample body
Code Block
languagejson
{}

This will reset the approval path - by default no comment will be generated.

Code Block
languagejson
{"createComment": true}

This will reset the path and generate a comment.