---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "Distributed runs"
description: "The `distributed_runs` collection of Sylphx Workflows: A DistributedRun is one start of a DistributedJob: a queue of shards and the workers that drain it."
type: reference
product: jobs
summary: "A DistributedRun is one start of a DistributedJob: a queue of shards and the workers that drain it."
updated: 2026-09-28
order: 900
---

> **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.

A DistributedRun is one start of a DistributedJob: a queue of shards and the workers that drain it.

**Service** Sylphx Workflows · **Resource type** `workflows.sylphx.com/DistributedRun` · **Name pattern** `orgs/{org}/projects/{project}/envs/{env}/distributed_jobs/{distributed_job}/distributed_runs/{distributed_run}` · **Shape** `record`

## Fields

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | `orgs/{org}/projects/{project}/envs/{env}/distributed_jobs/{distributed_job}/distributed_runs/{distributed_run}`. |
| `uid` | `string` | `drun_<cell><ulid>`; never reused. Output only. |
| `meta` | `ResourceMeta` | Resource metadata. |
| `job_generation` | `int64` | The DistributedJob generation the run pinned. Output only. |
| `state` | `DistributedRunState` | The run's lifecycle state. Output only. One of `queued`, `running`, `draining`, `succeeded`, `failed`, `cancelled`, `timed_out`. |
| `manifest_open` | `bool` | Whether more shards may still be added (`:addShards`). Output only. |
| `message` | `string` | Why the run failed or was refused, when it did. Output only. |
| `create_time` | `timestamp` | When the run was accepted. Output only. |
| `start_time` | `timestamp` | When the first worker started. Output only. |
| `end_time` | `timestamp` | When the run closed. Output only. |
| `shard_counts` | `ShardCounts` | Shards by state. Output only. |
| `worker_counts` | `WorkerCounts` | Workers by state. Output only. |
| `usage` | `DistributedRunUsage` | Metered usage across workers. Output only. |
| `args` | `string[]` | Arguments of every worker of this run (the job's when empty). |
| `env` | `map<string, string>` | Environment overrides of this run. |
| `shards` | `ShardInput[]` | The run's own shards (the customer's planner output); without them the job's `shard_count` makes index-only shards. |
| `open_manifest` | `bool` | Keep the manifest open: `:addShards` appends until it is closed. |

## Methods

Every method of the collection, in the registry's order, with the scope it
needs. The full request, response and examples are one link away.

| Method | Call | What it does |
| --- | --- | --- |
| `POST` | [`create`](/docs/api/distributed_runs#create) | Starts a run of a distributed job. The same `Idempotency-Key` returns the same run for 24h. |
| `GET` | [`get`](/docs/api/distributed_runs#get) | Gets a distributed run: its state, shard and worker counts, and usage. |
| `GET` | [`list`](/docs/api/distributed_runs#list) | Lists a distributed job's runs, newest first. |
| `POST` | [`cancel`](/docs/api/distributed_runs#cancel) | Cancels a distributed run: workers get SIGTERM and 30s, then leases are released; finished shards are kept. A closed run fails with INVALID_STATE. |
| `POST` | [`add_shards`](/docs/api/distributed_runs#add-shards) | Appends shards to a run started with an open manifest; `close` ends the manifest, and the run ends once those shards are done. |
| `GET` | [`read_shards`](/docs/api/distributed_runs#read-shards) | Reads a page of the run's shards, in queue order. |
| `GET` | [`read_workers`](/docs/api/distributed_runs#read-workers) | Reads a page of the run's workers. |

## create

Starts a run of a distributed job. The same `Idempotency-Key` returns the same run for 24h.

`POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs` · scope `workflows:run` · effect `write` · [Request, response and examples](/docs/api/distributed_runs/create)

## get

Gets a distributed run: its state, shard and worker counts, and usage.

`GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs/distributed-run` · scope `workflows:read` · effect `read` · [Request, response and examples](/docs/api/distributed_runs/get)

## list

Lists a distributed job's runs, newest first.

`GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs` · scope `workflows:read` · effect `read` · paginated · [Request, response and examples](/docs/api/distributed_runs/list)

## cancel

Cancels a distributed run: workers get SIGTERM and 30s, then leases are released; finished shards are kept. A closed run fails with INVALID_STATE.

`POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs/distributed-run:cancel` · scope `workflows:run` · effect `destructive` · [Request, response and examples](/docs/api/distributed_runs/cancel)

## add_shards

Appends shards to a run started with an open manifest; `close` ends the manifest, and the run ends once those shards are done.

`POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs/distributed-run:addShards` · scope `workflows:run` · effect `write` · [Request, response and examples](/docs/api/distributed_runs/add_shards)

## read_shards

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

`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` · [Request, response and examples](/docs/api/distributed_runs/read_shards)

## read_workers

Reads a page of the run's workers.

`GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs/distributed-run:readWorkers` · scope `workflows:read` · effect `read` · [Request, response and examples](/docs/api/distributed_runs/read_workers)
