You can fetch details about workflow runs, including their state, completed and in-progress steps, and step details.
The retention duration for completed workflow runs depends on your quota. Please check the pricing page for details.
If you have executed multiple workflow runs with the same workflowRunId, the workflowRunId
filter will return all of them. To uniquely identify a single workflow run, include the workflowCreatedAt
timestamp in your filter.
Request
By providing a cursor you can paginate through all of the workflow runs.
Filter workflow runs by run id.
Filter workflow runs by workflow url.
Filter workflow runs by the unix milliseconds value of creation timestamp
Filter workflow runs by state Value Description RUN_STARTED
The workflow has started to run and currently in progress. RUN_SUCCESS
The workflow run has completed succesfully. RUN_FAILED
Some errors has occured and workflow failed after all retries. RUN_CANCELED
The workflow run has canceled upon user request.
Filter workflow runs by starting date, in milliseconds (Unix timestamp). This is inclusive.
Filter workflow runs by ending date, in milliseconds (Unix timestamp). This is inclusive.
The number of workflow runs to return. Default and max is 10.
Filter workflow run by the label assigned by the user.
Response
A cursor which you can use in subsequent requests to paginate through all
workflow runs. If no cursor is returned, you have reached the end of the
workflow runs.
The ID of the workflow run.
The URL address of the workflow server.
The current state of the workflow run at this point in time Value Description RUN_STARTED
The workflow has started to run and currently in progress. RUN_SUCCESS
The workflow run has completed succesfully. RUN_FAILED
Some errors has occured and workflow failed after all retries. RUN_CANCELED
The workflow run has canceled upon user request.
The Unix timestamp (in milliseconds) when the workflow run started.
The Unix timestamp (in milliseconds) when the workflow run was completed, if applicable.
The label of the run assigned by the user on trigger.
The details of the failure callback message, if a failure function was defined for the workflow. The ID of the failure callback message
The URL address of the failure function
The state of the failure callback Value CALLBACK_INPROGRESS
CALLBACK_SUCCESS
CALLBACK_FAIL
The HTTP headers of the message that triggered the failure function.
The HTTP response status of the message that triggered the failure function.
The response body of the message that triggered the failure function.
The DLQ ID of the workflow run.
Response body of the failure function/url.
When failure function is used, this contains
the returned message from the failure function. Reponse headers of the failure function/url. This is valuable when the call to run the failure function/url is rejected
because of a platform limit.
Reponse status of the failure function/url. This is valuable when the call to run the failure function/url is rejected
because of a platform limit.
A call to failure url/function can be retried as maxRetries
time. This array contains errors of all retry
attempts. Response status of the endpoint that caused the error
Response Headers of the endpoint that caused the error
Response Body of the endpoint that caused the error if available
An error message that happened before/after calling the user’s endpoint.
The time of the error happened in Unix time milliseconds
Max number of retries configured when seeing an error.
The type of grouped steps Value Description sequential
Indicates only one step is excuted sequentially parallel
Indicates multiple steps being executed in parallel. next
Indicates there is information about currently executing step(s)
The ID of the step which increases monotonically.
The name of the step. It is specified in workflow by user.
Execution type of the step which indicates type of the context function. Value Function Initial
The default step which created automatically Run
context.run() Call
context.call() SleepFor
context.sleepFor() SleepUntil
context.sleepUntil() Wait
context.waitForEvent() Notify
context.notify() Invoke
context.invoke()
The ID of the message associated with this step.
The output returned by the step
The total number of concurrent steps that is running alongside this step
The state of this step at this point in time Value STEP_SUCCESS
STEP_RETRY
STEP_FAILED
STEP_CANCELED
The unix timestamp in milliseconds when the message associated with this step has created.
The unix timestamp in milliseconds when this step will be retried.
This is set only when the step state is STEP_RETRY
The following fields are set only when a specific type of step is executing. These fields are not available for all step types. The duration in milliseconds which step will sleep. Only set if stepType is SleepFor
.
The unix timestamp (in milliseconds) which step will sleep until. Only set if stepType is SleepUntil
.
The event id of the wait step. Only set if stepType is Wait
.
The unix timestamp (in milliseconds) when the wait will time out.
The duration of timeout in human readable format (e.g. 120s, 1m, 1h).
Set to true if this step is cause of a wait timeout rather than notifying the waiter.
The URL of the external address. Available only if stepType is Call
.
The HTTP method of the request sent to the external address. Available only if stepType is Call
.
The HTTP headers of the request sent to the external address. Available only if stepType is Call
.
The body of the request sent to the external address. Available only if stepType is Call
.
The HTTP status returned by the external call. Available only if stepType is Call
.
The body returned by the external call. Available only if stepType is Call
.
The HTTP headers returned by the external call. Available only if stepType is Call
.
The ID of the invoked workflow run if this step is an invoke step.
The URL address of the workflow server of invoked workflow run if this step is an invoke step.
The Unix timestamp (in milliseconds) when the invoked workflow was started if this step is an invoke step.
The body passed to the invoked workflow if this step is an invoke step.
The HTTP headers passed to invoked workflow if this step is an invoke step.
curl
Workflow JS SDK
Node
Python
Go
curl https://qstash.upstash.io/v2/workflows/logs \
-H "Authorization: Bearer <token>"
{
"cursor" : "1686652644442-12" ,
"runs" : [
{
"workflowRunId" : "wfr_rj0Upr1rvdzGfz96fXNHh" ,
"workflowUrl" : "https://feasible-eft-notably.ngrok-free.app/api/call" ,
"workflowState" : "RUN_SUCCESS" ,
"workflowRunCreatedAt" : 1736340463061 ,
"workflowRunCompletedAt" : 1736340464684 ,
"steps" : [
{
"steps" : [
{
"stepName" : "init" ,
"stepType" : "Initial" ,
"callType" : "step" ,
"messageId" : "msg_7YoJxFpwkEy5zBp378JgvD6YBDPBEqkBPje2JGTCEUiASMJQ1FwY9" ,
"concurrent" : 1 ,
"state" : "STEP_SUCCESS" ,
"createdAt" : 1736340463064
}
],
"type" : "sequential"
},
{
"steps" : [
{
"stepId" : 1 ,
"stepName" : "external call" ,
"stepType" : "Run" ,
"callType" : "step" ,
"messageId" : "msg_26hZCxZCuWyyTWPmSVBrNCtiJGNsULmt63vFfcZxQ3sfYFKLZe2dKww4BSb2kVF" ,
"out" : "1" ,
"concurrent" : 2 ,
"state" : "STEP_SUCCESS" ,
"createdAt" : 1736340464111
},
{
"stepId" : 2 ,
"stepName" : "external call 2" ,
"stepType" : "Run" ,
"callType" : "step" ,
"messageId" : "msg_26hZCxZCuWyyTWPmSVBrNB882AMRP1TsgzpygELRcLWep4ACNTTsCHhrZuaNLij" ,
"out" : "2" ,
"concurrent" : 2 ,
"state" : "STEP_SUCCESS" ,
"createdAt" : 1736340463895
}
],
"type" : "parallel"
}
]
}
]
}