---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "Read shards on a distributed run"
description: "`workflows.distributed_runs.read_shards` (GET /v1/{name}:readShards): Reads a page of the run's shards, in queue order."
type: reference
product: jobs
summary: "Reads a page of the run's shards, in queue order."
updated: 2026-09-28
nav: false
---

> **This method is not served on the public API.** `api.sylphx.com` does not route this call: its backend is not deployed behind the public API, or does not implement the call. This page documents the contract. It is kept out of the sidebar and of search engines.

Reads a page of the run's shards, in queue order.

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

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | The name of the distributed run. Required. |
| `page_size` | `int32` | At most this many; default 100, clamped to 1000. |
| `page_token` | `string` | `next_page_token` of the previous page. |
| `state_filter` | `ShardState` | Only shards in this state; unset reads every shard. One of `pending`, `leased`, `succeeded`, `failed`. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `shards` | `Shard[]` | The page, in queue order. |
| `next_page_token` | `string` | The token of the next page; empty on the last page. |

### Shard

| Field | Type | What it is |
| --- | --- | --- |
| `id` | `string` | The shard id, unique in its run. Output only. |
| `seq` | `int64` | Order in the run's queue, from 0. Output only. |
| `state` | `ShardState` | The shard's state. Output only. One of `pending`, `leased`, `succeeded`, `failed`. |
| `attempts` | `int32` | Attempts counted so far (failures and timeouts, not preemptions). Output only. |
| `worker` | `string` | The worker holding or last holding the lease. Output only. |
| `outputs` | `value` | What the worker reported at `complete`, any JSON. Output only. |
| `error` | `string` | The last failure's message. 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.
- [`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.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.

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/distributed_jobs/distributed-job/distributed_runs/distributed-run:readShards" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"
```

**TypeScript**

```ts
const response = await sylphx.workflows.distributedRuns.readShards({ name: 'orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs/distributed-run' })
```

**Rust**

```rust
let mut req = sylphx::workflows::ReadDistributedRunShardsRequest::default();
req.name = "orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs/distributed-run".to_string();
let response = sx.workflows().distributed_runs().read_shards(req).await?;
```

**CLI**

```bash
sylphx workflows distributed-runs read-shards orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs/distributed-run
```

**MCP**

```json
{ "method_id": "workflows.distributed_runs.read_shards", "args": {"name":"orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs/distributed-run"} }
```
