---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "Read logs on a job run"
description: "`workflows.job_runs.read_logs` (GET /v1/{name}:readLogs): Reads a page of a job run's log lines, oldest first."
type: reference
product: jobs
summary: "Reads a page of a job run's log lines, oldest first."
updated: 2026-09-28
nav: false
---

Reads a page of a job run's log lines, oldest first. With `wait`, an empty page on a running run waits up to that long for new lines, so a client follows the log by passing each `next_page_token` back.

- **Path** `GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run:readLogs`
- **Scope** `workflows:read`
- **Effect** `read` — nothing is written.
- **Collection** [job_runs](/docs/api/job_runs)
- **Query** `page_size`, `page_token`, `wait`

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | The name of the job run. Required. |
| `page_size` | `int32` | At most this many lines; default 500, clamped to 5000. |
| `page_token` | `string` | `next_page_token` of the previous page. |
| `wait` | `duration` | On a running run, wait up to this long (at most 30s) for new lines before returning an empty page. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `lines` | `JobLogLine[]` | The page, oldest first. |
| `next_page_token` | `string` | The token of the next page. It is set while the run can still write, so a follower keeps polling; empty once the run closed and every line was read. |

### JobLogLine

| Field | Type | What it is |
| --- | --- | --- |
| `write_time` | `timestamp` | When the line was written. Output only. |
| `attempt` | `int32` | The attempt that wrote it, from 1. Output only. |
| `stream` | `string` | `stdout` or `stderr`. Output only. |
| `text` | `string` | The line, without its trailing newline. Output only. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`PAGE_TOKEN_MISMATCH`](/docs/api/errors/PAGE_TOKEN_MISMATCH) — A page token was reused with different parameters.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run:readLogs" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"
```

**TypeScript**

```ts
const response = await sylphx.workflows.jobRuns.readLogs({ name: 'orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run' })
```

**Rust**

```rust
let mut req = sylphx::workflows::ReadJobRunLogsRequest::default();
req.name = "orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run".to_string();
let response = sx.workflows().job_runs().read_logs(req).await?;
```

**CLI**

```bash
sylphx workflows job-runs read-logs orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run
```

**MCP**

```json
{ "method_id": "workflows.job_runs.read_logs", "args": {"name":"orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run"} }
```
