Skip to main content
The logs method retrieves workflow run logs using the List Workflow Runs API.

Arguments

workflowRunId
string
Filter by a specific workflow run ID.
count
number
Maximum number of runs to return. Defaults to a system-defined value if not specified.
state
string
Filter workflow runs by execution state.
StateDescription
RUN_STARTEDThe workflow run is in progress.
RUN_SUCCESSThe workflow run completed successfully.
RUN_FAILEDThe run failed after all retries.
RUN_CANCELEDThe run was manually canceled.
workflowUrl
string
Filter by the exact workflow URL.
label
string
Filter by workflow label.
workflowCreatedAt
number
Filter by the workflow creation time (Unix timestamp).
cursor
string
A pagination cursor from a previous request. Use this to fetch the next set of results.

Response

cursor
string
A cursor to use for pagination. If no cursor is returned, there are no more workflow runs.
runs
Array

Usage

import { Client } from "@upstash/workflow";

const client = new Client({ token: "<QSTASH_TOKEN>" })
const { runs, cursor } = await client.logs({})