DLQ

Bulk Delete Failed Workflow Runs

Delete multiple failed workflow runs from the DLQ.

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

Authorization

Authorizationheaderstringrequired

Bearer authentication header of the form Bearer <token>.

Query parameters

dlqIdsquerystring[]

List of specific DLQ IDs to delete. If provided, other filters are ignored.

cursorquerystring

Pagination cursor for deleting in batches.

countqueryinteger

Maximum number of workflows to delete per request.

fromDatequeryinteger

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

toDatequeryinteger

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

workflowUrlquerystring[]

Filter by workflow URL. Supports multiple values.

workflowRunIdquerystring

Filter by workflow run ID.

workflowCreatedAtqueryinteger

Filter by workflow creation timestamp in milliseconds (Unix timestamp).

labelquerystring[]

Filter by label assigned to the workflow run. 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
failureFunctionStatequerystring[]

Filter by failure function state. Supports multiple values.

StateDescription
CALLBACK_INPROGRESSThe failure function is in progress.
CALLBACK_SUCCESSThe failure function run successfully.
CALLBACK_FAILThe failure function failed to run.
CALLBACK_CANCELEDThe failure function was manually canceled
callerIpquerystring[]

Filter by IP address of the publisher. Supports multiple values.

flowControlKeyquerystring[]

Filter by Flow Control Key. Supports multiple values.

Response

200 — Workflows deleted successfully

deletedinteger

The number of workflow runs that were deleted.

cursorstring

Pagination cursor for the next batch. Only present when using filters without DLQ IDs.

400 — Bad Request

errorstringrequired

Error message

401 — Unauthorized

errorstringrequired

Error message

500 — Internal Server Error

errorstringrequired

Error message

Loading search…