Cancel one or more workflow runs. You can pass IDs directly, use filters, or cancel all at once.
Arguments#
The cancel method accepts one of the following:
By ID#
Pass a single workflow run ID or an array of IDs directly:
By filters#
Pass an object with a filter field containing one or more filter criteria:
Show propertiesHide properties
Cancel workflows matching this exact URL. Cannot be combined with workflowUrlStartingWith.
Cancel workflows whose URL starts with this prefix. Cannot be combined with workflowUrl.
Cancel workflows with this label. Pass an array to match runs that have any of the given labels (OR semantics).
Cancel workflows created after this date. Accepts Date objects or Unix timestamps (ms).
Cancel workflows created before this date. Accepts Date objects or Unix timestamps (ms).
Cancel workflows triggered by this IP address.
Cancel workflows with this flow control key.
Maximum number of workflow runs to cancel per call. Defaults to 100.
Cancel all#
Set to true to cancel all pending and active workflow runs.
Response#
The number of workflow runs that were cancelled.
Usage#
Cancel by ID#
Cancel with URL filter#
Cancel all workflow runs on a specific endpoint using a URL prefix:
For an exact URL match:
Cancel with filters#
You can combine multiple filter parameters: