Runs

List approval flow runs

GET/organizations/{organizationId}/approvals/{approvalId}/runs
Authorization
Path parameters
organizationId*string

The organization ID

approvalId*string (uuid)
Query parameters
Response

OK

Body
resultsarray of ApprovalRun
nextPageTokenstring

The token to fetch the next page of results. If empty, there are no more results to fetch.

Request
const response = await fetch('/organizations/{organizationId}/approvals/{approvalId}/runs', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "approvalFlowId": "123e4567-e89b-12d3-a456-426614174000",
      "organizationId": "123e4567-e89b-12d3-a456-426614174000",
      "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
      "status": "pending",
      "activeStep": 0,
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "results": [
        {
          "reviewer": {
            "type": "user",
            "id": "123e4567-e89b-12d3-a456-426614174000"
          },
          "result": "approved",
          "comment": "text"
        }
      ],
      "createdAt": "2024-11-21T08:37:07.532Z",
      "updatedAt": "2024-11-21T08:37:07.532Z"
    }
  ],
  "nextPageToken": "text"
}

Get approval flow run

GET/organizations/{organizationId}/approvals/{approvalId}/runs/{approvalRunId}
Authorization
Path parameters
organizationId*string

The organization ID

approvalId*string (uuid)
approvalRunId*string (uuid)
Response

OK

Body
id*string (uuid)
approvalFlowId*string (uuid)
organizationIdstring (uuid)
workspaceIdstring (uuid)
status*enum
pendingapproveddenied
activeStepnumber
previousObjectobject
objectobject
tags*array of object
results*array of object
createdAt*string (date-time)
updatedAt*string (date-time)
Request
const response = await fetch('/organizations/{organizationId}/approvals/{approvalId}/runs/{approvalRunId}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "approvalFlowId": "123e4567-e89b-12d3-a456-426614174000",
  "organizationId": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "activeStep": 0,
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ],
  "results": [
    {
      "reviewer": {
        "type": "user",
        "id": "123e4567-e89b-12d3-a456-426614174000"
      },
      "result": "approved",
      "comment": "text"
    }
  ],
  "createdAt": "2024-11-21T08:37:07.532Z",
  "updatedAt": "2024-11-21T08:37:07.532Z"
}

Last updated