Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

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

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/distributed_jobs/{distributed_job}/distributed_runs/{distributed_run}.
uidstringdrun_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
job_generationint64The DistributedJob generation the run pinned. Output only.
stateDistributedRunStateThe run's lifecycle state. Output only. One of queued, running, draining, succeeded, failed, cancelled, timed_out.
manifest_openboolWhether more shards may still be added (:addShards). Output only.
messagestringWhy the run failed or was refused, when it did. Output only.
create_timetimestampWhen the run was accepted. Output only.
start_timetimestampWhen the first worker started. Output only.
end_timetimestampWhen the run closed. Output only.
shard_countsShardCountsShards by state. Output only.
worker_countsWorkerCountsWorkers by state. Output only.
usageDistributedRunUsageMetered usage across workers. Output only.
argsstring[]Arguments of every worker of this run (the job's when empty).
envmap<string, string>Environment overrides of this run.
shardsShardInput[]The run's own shards (the customer's planner output); without them the job's shard_count makes index-only shards.
open_manifestboolKeep 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.

MethodCallWhat it does
POSTcreateStarts a run of a distributed job. The same Idempotency-Key returns the same run for 24h.
GETgetGets a distributed run: its state, shard and worker counts, and usage.
GETlistLists a distributed job's runs, newest first.
POSTcancelCancels a distributed run: workers get SIGTERM and 30s, then leases are released; finished shards are kept. A closed run fails with INVALID_STATE.
POSTadd_shardsAppends shards to a run started with an open manifest; close ends the manifest, and the run ends once those shards are done.
GETread_shardsReads a page of the run's shards, in queue order.
GETread_workersReads 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