Runs

Bulk Cancel Workflow Runs

Cancel all matching workflow runs.

DELETE/v2/workflows/runs
cURL
curl --request DELETE \
  --url https://qstash-{region}.upstash.io/v2/workflows/runs \
  --header 'Authorization: Bearer <token>'
200Response
{
  "cancelled": 123
}

Authorization

Authorizationheaderstringrequired

Bearer authentication header of the form Bearer <token>.

Query parameters

workflowRunIdsquerystring[]

Optional list of specific workflow run IDs to cancel. If provided, the other filters are ignored.

workflowUrlquerystring[]required

The URL of the workflow whose runs to cancel. Supports multiple values.

workflowUrlExactMatchquerybooleandefault: false

workflow url is searched as a prefix by default. To make it exact match, workflowUrlExactMatch can be set to true.

fromDatequerynumber

Optional start date to filter workflow runs to cancel. Unix timestamp in milliseconds.

toDatequerynumber

Optional end date to filter workflow runs to cancel. Unix timestamp in milliseconds.

callerIpquerystring[]

Optional caller IP address to filter workflow runs to cancel. Supports multiple values.

flowControlKeyquerystring[]

Optional flow control key to filter workflow runs to cancel. Supports multiple values.

labelquerystring[]

Optional label to filter workflow runs to cancel. Supports multiple values. You can pass multiple values to match workflow runs with any of the given labels (OR logic).

Examples:

  • label=my_label
  • label=label_1&label=label_2
  • label=label_1,label_2
countqueryintegerdefault: 100

Maximum number of workflow runs to cancel. Default is 100.

Response

200 — All workflow runs cancelled successfully

cancelledinteger

The number of workflow runs that were cancelled.

Loading search…