List workflows

Lists all workflows of a workflow definition.

Results are sorted by time, with the most recently started first.

Request syntax

GET /workflow-definitions/${WORKFLOW_DEFINITION_ID}/workflows?version=${WORKFLOW_DEFINITION_VERSION}&next=${NEXT_PAGE_CURSOR}&size=${PAGE_SIZE} HTTP/1.1
Host: api.simworkflow.com
Authorization: Bearer ${PERSONAL_ACCESS_TOKEN}

Request headers

Authorization

Bearer ${PERSONAL_ACCESS_TOKEN}

URI request parameters

version

List the workflows associated with a specific workflow definition version. The default is the latest workflow definition version.

Required: No

next

If next field is returned, there are more results available. The value of next is a unique pagination token for each page.

Required: No

size

The maximum number of items to return per call. You can use next field to obtain further pages of results. The default is 100 and the allowed page sizes are: 5, 10, 25, 50, 100, 1000.

Required: No

Response syntax

HTTP/1.1 200 OK
{
  "content": [
    {
      "id": String,
      "organizationId": String,
      "workflowDefinitionId": String,
      "workflowDefinitionVersion": Integer,
      "status": String,
      "startedTime": Timestamp,
      "endedTime": Timestamp
    }
  ],
  "next": String
}

Response elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Field

Type

Description

content

Array[JSON Object]

Array of workflows.

next

String

The next list requests to SimWorkflow can be continued with this next. next is obfuscated and is not a real key.

Errors

See also general errors.

cURL example: get all workflows of the latest workflow definition

GET /workflow-definitions/6FE3mVtZSX1NWzTdVAOc4n/workflows

curl \
--request "GET" \
--header "Authorization: Bearer ${PERSONAL_ACCESS_TOKEN}" \
--url "https://api.simworkflow.com/workflow-definitions/6FE3mVtZSX1NWzTdVAOc4n/workflows"

RESPONSE

HTTP/1.1 200 OK
{
  "content": [
    {
      "id": "7Miuphy6saCGJlkVfTcU49",
      "organizationId": "0y4OfYajRyqc2RNueODHww",
      "workflowDefinitionId": "7RXzkCER4ERYGpMzvrfy1D",
      "workflowDefinitionVersion": 2,
      "status": "Running",
      "startedTime": "2023-11-03T13:01:54.538Z",
      "endedTime": null
    }
  ],
  "next": null
}