DLQ

Bulk Restart Workflows from DLQ

Restart multiple failed workflow runs from the DLQ. Each workflow will start from the beginning.

POST/v2/workflows/dlq/restart
cURL
curl --request POST \
  --url https://qstash-{region}.upstash.io/v2/workflows/dlq/restart \
  --header 'Authorization: Bearer <token>'
200Response
{
  "workflowRuns": [
    {
      "workflowRunId": "<string>",
      "workflowCreatedAt": 123
    }
  ],
  "cursor": "<string>"
}

Authorization

Authorizationheaderstringrequired

Bearer authentication header of the form Bearer <token>.

Query parameters

dlqIdsquerystring[]

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

cursorquerystring

Pagination cursor for restarting workflows in batches.

countqueryinteger

Maximum number of workflows to restart. If not provided, all matching workflows will be restarted.

fromDatequeryinteger

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

toDatequeryinteger

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

workflowUrlquerystring[]

Filter workflows by workflow URL. Supports multiple values.

workflowRunIdquerystring

Filter workflows by workflow run ID.

workflowCreatedAtqueryinteger

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

labelquerystring[]

Filter workflows by label. Supports multiple values. You can pass multiple values to match workflows 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 workflows 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 workflows by IP address of the publisher. Supports multiple values.

flowControlKeyquerystring[]

Filter workflows by Flow Control Key. Supports multiple values.

Header parameters

Upstash-Retriesheaderinteger

Override the number of retries for the workflow steps.

Upstash-Delayheaderstring

Override the delay before executing the workflows. Format is <value><unit> (e.g., "10s", "5m").

Upstash-Retry-Delayheaderstring

Override the retry delay expression for the workflow steps.

Upstash-Flow-Control-Keyheaderstring

Override the flow control key for the workflows.

Upstash-Flow-Control-Valueheaderstring

Override the flow control configuration in the format parallelism=<value>, rate=<value>, period=<value>.

Upstash-Labelheaderstring

Override the label(s) for the workflows.

You can assign multiple labels by providing a comma-separated list.

Example: label_1,label_2

Upstash-Failure-Callbackheaderstring

Override the failure callback URL for the workflows.

Response

200 — Workflows restarted successfully

workflowRunsobject[]

Array of restarted workflow runs.

cursorstring

Pagination cursor to use in subsequent requests. If empty, all matching workflows have been processed.

400 — Bad Request

errorstringrequired

Error message

401 — Unauthorized

errorstringrequired

Error message

404 — Some DLQ messages were not found

errorstringrequired

Error message

500 — Internal Server Error

errorstringrequired

Error message

Loading search…