Menu
Platform
AI
App store purchases
Database
Flags
Jobs and cron
Localization
Monitoring
Notifications
Payments
Queues
Sandboxes
Webhooks
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Distributed runs
A DistributedRun is one start of a DistributedJob: a queue of shards and the workers that drain it.
This method is not served on the public API.
api.sylphx.comdoes 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 | Starts a run of a distributed job. The same Idempotency-Key returns the same run for 24h. |
GET | get | Gets a distributed run: its state, shard and worker counts, and usage. |
GET | list | Lists a distributed job's runs, newest first. |
POST | 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 | 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 | Reads a page of the run's shards, in queue order. |
GET | 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
#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
#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
#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
#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
#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
#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