---
# @generated by sylphx-gen. Do not edit.
title: "Read logs on a build attempt"
description: "`release.build_attempts.read_logs` (GET /v1/{name}:readLogs): Reads a bounded page of the native build container's retained output, oldest first."
type: reference
product: platform
summary: "Reads a bounded page of the native build container's retained output, oldest first."
updated: 2026-09-28
nav: false
---

Reads a bounded page of the native build container's retained output, oldest first. These logs are separate from standalone Build runs.

- **Path** `GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/build_attempts/build-attempt:readLogs`
- **Scope** `release:read`
- **Effect** `read` — nothing is written.
- **Collection** [build_attempts](/docs/api/build_attempts)
- **Query** `page_token`

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | The exact canonical attempt name returned by ListBuildAttempts. Required. |
| `page_token` | `string` | Resume after this cursor from the same attempt and principal. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `lines` | `string[]` | Redacted build container output, in order. Container streams are combined. Output only. |
| `next_page_token` | `string` | Cursor after this page; it can also be used after a terminal page. Output only. |
| `has_more` | `bool` | True if another page can be read immediately. Output only. |
| `done` | `bool` | True when the attempt is terminal and the retained output window is drained. Output only. |
| `state` | `BuildAttemptState` | Latest recorded attempt state. A successful build need not be serving. Output only. One of `queued`, `building`, `succeeded`, `failed`, `cancelled`. |

## 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.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`PAGE_TOKEN_MISMATCH`](/docs/api/errors/PAGE_TOKEN_MISMATCH) — A page token was reused with different parameters.
- [`UNAVAILABLE`](/docs/api/errors/UNAVAILABLE) — The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.

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/build_attempts/build-attempt:readLogs" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"
```

**TypeScript**

```ts
const response = await sylphx.release.buildAttempts.readLogs({ name: 'orgs/acme/projects/shop/envs/production/build_attempts/build-attempt' })
```

**Rust**

```rust
let mut req = sylphx::release::ReadBuildAttemptLogsRequest::default();
req.name = "orgs/acme/projects/shop/envs/production/build_attempts/build-attempt".to_string();
let response = sx.release().build_attempts().read_logs(req).await?;
```

**CLI**

```bash
sylphx release build-attempts read-logs orgs/acme/projects/shop/envs/production/build_attempts/build-attempt
```

**MCP**

```json
{ "method_id": "release.build_attempts.read_logs", "args": {"name":"orgs/acme/projects/shop/envs/production/build_attempts/build-attempt"} }
```
