> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-partnerstash.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# client.logs

The `logs` method retrieves workflow run logs using the [List Workflow Runs API](/workflow/rest/runs/logs).

## Arguments

<ParamField body="workflowRunId" type="string" optional>
  Filter by a specific workflow run ID.
</ParamField>

<ParamField body="count" type="number" optional>
  Maximum number of runs to return. Defaults to a system-defined value if not specified.
</ParamField>

<ParamField body="state" type="string" optional>
  Filter workflow runs by execution state.

  | State          | Description                              |
  | -------------- | ---------------------------------------- |
  | `RUN_STARTED`  | The workflow run is in progress.         |
  | `RUN_SUCCESS`  | The workflow run completed successfully. |
  | `RUN_FAILED`   | The run failed after all retries.        |
  | `RUN_CANCELED` | The run was manually canceled.           |
</ParamField>

<ParamField body="workflowUrl" type="string" optional>
  Filter by the exact workflow URL.
</ParamField>

<ParamField body="workflowCreatedAt" type="number" optional>
  Filter by the workflow creation time (Unix timestamp).
</ParamField>

<ParamField body="cursor" type="string" optional>
  A pagination cursor from a previous request.
  Use this to fetch the next set of results.
</ParamField>

## Response

<ResponseField name="cursor" type="string">
  A cursor to use for pagination.
  If no cursor is returned, there are no more workflow runs.
</ResponseField>

<Snippet file="workflow/logs.mdx" />

***

## Usage

```ts theme={null}
import { Client } from "@upstash/workflow";

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