GET
/
v2
/
workflows
/
logs
curl https://qstash.upstash.io/v2/workflows/logs \
  -H "Authorization: Bearer <token>"
{
  "cursor": "1686652644442-12",
  "runs": [
    {
      "workflowRunId": "wfr_rj0Upr1rvdzGfz96fXNHh",
      "workflowUrl": "https://feasible-eft-notably.ngrok-free.app/api/call",
      "workflowState": "RUN_SUCCESS",
      "workflowRunCreatedAt": 1736340463061,
      "workflowRunCompletedAt": 1736340464684,
      "steps": [
        {
          "steps": [
            {
              "stepName": "init",
              "stepType": "Initial",
              "callType": "step",
              "messageId": "msg_7YoJxFpwkEy5zBp378JgvD6YBDPBEqkBPje2JGTCEUiASMJQ1FwY9",
              "concurrent": 1,
              "state": "STEP_SUCCESS",
              "createdAt": 1736340463064
            }
          ],
          "type": "sequential"
        },
        {
          "steps": [
            {
              "stepId": 1,
              "stepName": "external call",
              "stepType": "Run",
              "callType": "step",
              "messageId": "msg_26hZCxZCuWyyTWPmSVBrNCtiJGNsULmt63vFfcZxQ3sfYFKLZe2dKww4BSb2kVF",
              "out": "1",
              "concurrent": 2,
              "state": "STEP_SUCCESS",
              "createdAt": 1736340464111
            },
            {
              "stepId": 2,
              "stepName": "external call 2",
              "stepType": "Run",
              "callType": "step",
              "messageId": "msg_26hZCxZCuWyyTWPmSVBrNB882AMRP1TsgzpygELRcLWep4ACNTTsCHhrZuaNLij",
              "out": "2",
              "concurrent": 2,
              "state": "STEP_SUCCESS",
              "createdAt": 1736340463895
            }
          ],
          "type": "parallel"
        }
      ]
    }
  ]
}

You can fetch details about workflow runs, including their state, completed and in-progress steps, and step details.

The retention duration for completed workflow runs depends on your quota. Please check the pricing page for details.

If you have executed multiple workflow runs with the same workflowRunId, the workflowRunId filter will return all of them.

To uniquely identify a single workflow run, include the workflowCreatedAt timestamp in your filter.

Request

cursor
string

By providing a cursor you can paginate through all of the workflow runs.

workflowRunId
string

Filter workflow runs by run id.

workflowUrl
string

Filter workflow runs by workflow url.

workflowCreatedAt
number

Filter workflow runs by the unix milliseconds value of creation timestamp

state
string

Filter workflow runs by state

ValueDescription
RUN_STARTEDThe workflow has started to run and currently in progress.
RUN_SUCCESSThe workflow run has completed succesfully.
RUN_FAILEDSome errors has occured and workflow failed after all retries.
RUN_CANCELEDThe workflow run has canceled upon user request.
fromDate
number

Filter workflow runs by starting date, in milliseconds (Unix timestamp). This is inclusive.

toDate
number

Filter workflow runs by ending date, in milliseconds (Unix timestamp). This is inclusive.

count
number

The number of workflow runs to return. Default and max is 10.

Response

cursor
string

A cursor which you can use in subsequent requests to paginate through all workflow runs. If no cursor is returned, you have reached the end of the workflow runs.

runs
Array
curl https://qstash.upstash.io/v2/workflows/logs \
  -H "Authorization: Bearer <token>"
{
  "cursor": "1686652644442-12",
  "runs": [
    {
      "workflowRunId": "wfr_rj0Upr1rvdzGfz96fXNHh",
      "workflowUrl": "https://feasible-eft-notably.ngrok-free.app/api/call",
      "workflowState": "RUN_SUCCESS",
      "workflowRunCreatedAt": 1736340463061,
      "workflowRunCompletedAt": 1736340464684,
      "steps": [
        {
          "steps": [
            {
              "stepName": "init",
              "stepType": "Initial",
              "callType": "step",
              "messageId": "msg_7YoJxFpwkEy5zBp378JgvD6YBDPBEqkBPje2JGTCEUiASMJQ1FwY9",
              "concurrent": 1,
              "state": "STEP_SUCCESS",
              "createdAt": 1736340463064
            }
          ],
          "type": "sequential"
        },
        {
          "steps": [
            {
              "stepId": 1,
              "stepName": "external call",
              "stepType": "Run",
              "callType": "step",
              "messageId": "msg_26hZCxZCuWyyTWPmSVBrNCtiJGNsULmt63vFfcZxQ3sfYFKLZe2dKww4BSb2kVF",
              "out": "1",
              "concurrent": 2,
              "state": "STEP_SUCCESS",
              "createdAt": 1736340464111
            },
            {
              "stepId": 2,
              "stepName": "external call 2",
              "stepType": "Run",
              "callType": "step",
              "messageId": "msg_26hZCxZCuWyyTWPmSVBrNB882AMRP1TsgzpygELRcLWep4ACNTTsCHhrZuaNLij",
              "out": "2",
              "concurrent": 2,
              "state": "STEP_SUCCESS",
              "createdAt": 1736340463895
            }
          ],
          "type": "parallel"
        }
      ]
    }
  ]
}