# List execution logs

> The runs of a workflow (or of several, options.workflows) matching the log explorer's query and time range, with the sections asked for (rows, count and chart, payload keys) and the cursors of the listing mode.

Source: https://docs.stacksync.com/api-reference/workflows/runs/list_workflow_runs

`POST https://api.stacksync.com/v1/workspaces/{workspace_id}/workflows/id/{workflow_id}/executions/list-logs`

- Operation: `list_workflow_runs`
- Resource: Workflow runs
- Access: writes data

## Authentication

- `Authorization: Bearer <key>`: A workspace API key (workspace_…, created by a workspace owner under Workspace settings > Stacksync API) acts with editor rights on that workspace only; a user API key (user_…, created under Profile > Stacksync API) acts as that user in every workspace they belong to. POST, PUT and PATCH requests must send Content-Type: application/json. Every authentication failure answers 403.
- `Content-Type: application/json` on every request with a body.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | integer | Yes | The workspace. List the ones your key can reach with GET /v1/workspaces. |
| `workflow_id` | string (uuid) | Yes | The workflow. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `region` | string \| null | No | Region of the workflow: besg or usnv. Required, except when List workflow runs reads several workflows through options.workflows |

## Request body

`application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `options` | any | No |  |
| `extra_columns` | any | No |  |

## Returns

### 200 OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | array of object \| null | No |  |
| `meta` | object \| null | No |  |
| `keys` | array of any \| null | No |  |
| `total_executions` | integer \| null | No |  |
| `next_cursor` | any | No |  |
| `prev_cursor` | any | No |  |
| `newest_cursor` | any | No |  |
| `oldest_cursor` | any | No |  |
| `has_more` | boolean \| null | No |  |

## Example request

```bash
curl -X POST "https://api.stacksync.com/v1/workspaces/{workspace_id}/workflows/id/{workflow_id}/executions/list-logs?region=usnv" \
  -H "Authorization: Bearer $STACKSYNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "options": {
    "limit": 50,
    "query": "workflow.execution_status = '\''ERROR'\''",
    "sort": "desc",
    "time_range": [
      "2026-10-01T00:00:00Z",
      "2026-10-02T00:00:00Z"
    ]
  }
}'
```

## Example response (200)

```json
{
  "data": [
    {}
  ],
  "meta": {},
  "keys": [
    "<keys>"
  ],
  "total_executions": 0,
  "next_cursor": "<next_cursor>",
  "prev_cursor": "<prev_cursor>",
  "newest_cursor": "<newest_cursor>",
  "oldest_cursor": "<oldest_cursor>",
  "has_more": false
}
```

## Errors

| Status | Meaning | Body |
| --- | --- | --- |
| 400 | Bad Request | `{ "error": string }` |
| 403 | Forbidden | `{ "error": string }` |
| 404 | Not Found | `{ "error": string }` |
| 409 | Conflict | `{ "error": string }` |
| 422 | Unprocessable Content | `{ "error": string }` |

## Related

- [API Reference overview](https://docs.stacksync.com/api-reference): base URLs, regions, pagination, idempotency and errors
- [Authentication](https://docs.stacksync.com/api-reference/authentication): API keys and the 403 answers
- OpenAPI document: https://docs.stacksync.com/openapi.json
- [List workflow run step logs](https://docs.stacksync.com/api-reference/workflows/runs/list_workflow_run_logs)
- [Get export capabilities](https://docs.stacksync.com/api-reference/workflows/runs/get_workflow_run_export_capabilities)
- [Replay executions](https://docs.stacksync.com/api-reference/workflows/runs/replay_workflow_runs)
- [Replay executions by filter](https://docs.stacksync.com/api-reference/workflows/runs/replay_workflow_runs_by_filter)
- [Resolve executions by filter](https://docs.stacksync.com/api-reference/workflows/runs/resolve_workflow_runs_by_filter)