Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Add shards on a distributed run

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

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.

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

  • Path 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 — a successful call changes state.
  • Collection distributed_runs

#Request

FieldTypeWhat it is
namestringThe name of the distributed run; its manifest must be open. Required.
shardsShardInput[]The shards to append.
closeboolClose the manifest: the run ends once its shards are done.

#ShardInput

FieldTypeWhat it is
idstringThe shard id, unique in the run; the server assigns one when empty.
inputvalueWhat the worker gets as its input, any JSON.

#Response

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.

#ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

#ShardCounts

FieldTypeWhat it is
pendingint64Waiting to be leased. Output only.
leasedint64Held by a worker. Output only.
succeededint64Completed. Output only.
failedint64Out of attempts. Output only.
totalint64Every shard of the run. Output only.

#WorkerCounts

FieldTypeWhat it is
createdint64Every worker the run created. Output only.
waitingint64Waiting for Kueue to admit them. Output only.
runningint64Running. Output only.
endedint64Ended. Output only.

#DistributedRunUsage

FieldTypeWhat it is
worker_durationdurationSummed worker run time from container start to exit. Output only.
worker_classWorkerClassThe price class the workers ran in. Output only. One of scavenger, standard.
instance_typestringThe instance type the workers ran on. Output only.

#ShardInput

FieldTypeWhat it is
idstringThe shard id, unique in the run; the server assigns one when empty.
inputvalueWhat the worker gets as its input, any JSON.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/distributed_jobs/distributed-job/distributed_runs/distributed-run:addShards" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'