Runs

Bulk Cancel Workflow Runs

Changed on

Cancel all matching workflow runs.

delete/v2/workflows/runs

Request

Query parameters

workflowRunIdsstring[]

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

workflowUrlstring[]

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

workflowUrlExactMatchboolean

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

fromDatenumber

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

toDatenumber

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

callerIpstring[]

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

flowControlKeystring[]

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

labelstring[]

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
hoststring[]

Optional host of the workflow URL to filter workflow runs to cancel. Supports multiple values.

pathstring[]

Optional path of the workflow URL to filter workflow runs to cancel. Supports multiple values.

asyncboolean

Only applies to filter-based cancels. If true, the request returns as soon as the bulk action is created, without waiting for it to finish. The response includes the actionId of the bulk action.

countinteger

Deprecated. This parameter is ignored, and all workflow runs matching the filters are cancelled.

Response

Workflow runs cancelled, or the bulk action is created when async=true.

cancelledinteger

When cancelling by workflowRunIds, the number of workflow runs cancelled.

For filter-based cancels, the number of in-progress workflow runs that matched the filters when the request was accepted.

actionIdstring

The ID of the bulk action. Only returned for filter-based cancels with async=true.

Changes

    • breaking

      for the query request parameter count, default value 100 was removed

    • info

      added the new optional query request parameter async

    • info

      added the new optional query request parameter host

    • info

      added the new optional query request parameter path

    • info

      the query request parameter workflowUrl became optional

    • info

      query request parameter count was deprecated

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      for the query request parameter callerIp, the type was generalized from string to array

    • info

      for the query request parameter flowControlKey, the type was generalized from string to array

    • info

      for the query request parameter workflowUrl, the type was generalized from string to array