Skip to content
Console
Menu

Getting Started

Authentication

KV Store

Create pinned on a job run

Starts exactly the pinned Job snapshot under a permanent caller-selected run id.

Starts exactly the pinned Job snapshot under a permanent caller-selected run id. Predecessor servers do not serve this route, so unsupported pins cannot silently start work. Replays return the original immutable run.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs:createPinned
  • Scope workflows:run
  • Effect write — a successful call changes state.
  • Collection job_runs
  • Query job_run_id, validate_only, expected_job_uid, expected_job_generation, create_not_after

#Request

FieldTypeWhat it is
parentstringThe job to run. Required.
job_run_idstringPermanent caller-selected run id, distinct from the server-assigned UID. Required.
job_runJobRunThe run to start: args and env override the Job's for this run. Required.
validate_onlyboolValidate and return the result without starting anything.
expected_job_uidstringRequire this immutable Job identity, checked again at insertion. Required.
expected_job_generationint64Require this generation of the frozen Job spec. Required.
create_not_aftertimestampA new run can be inserted only before this instant. Identical replay is still available afterward. Exact GET serializes with in-flight insertion. Required.

#JobRun

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/jobs/{job}/job_runs/{job_run}.
metaResourceMetaResource metadata.
argsstring[]Arguments of this run (the Job's when empty).
envmap<string, string>Environment overrides of this run.
schedule_timetimestampStart no earlier than this: set it directly, or through start_delay; at most 365 days ahead. A run cancelled before then makes no attempt.
start_delaydurationStart no earlier than this long after the request.

#ResourceMeta

FieldTypeWhat it is
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.

#Response

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/jobs/{job}/job_runs/{job_run}.
uidstringjrun_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
job_generationint64The Job generation the run pinned. Output only.
resolved_imagestringThe image digest the run executes. Output only.
argsstring[]Arguments of this run (the Job's when empty).
envmap<string, string>Environment overrides of this run.
stateJobRunStateThe run's lifecycle state. Output only. One of queued, running, succeeded, failed, cancelled, timed_out.
exit_codeint32The last attempt's exit code, once it exited. Output only.
attempt_countint32Attempts made so far. Output only.
termination_reasonstringWhy the last attempt ended other than by exiting, for example OOMKilled or Evicted. Output only.
schedule_fireScheduleFireRefSet when a Schedule fire started the run. Output only.
create_timetimestampWhen the run was accepted. Output only.
start_timetimestampWhen the first attempt started. Output only.
end_timetimestampWhen the run closed. Output only.
usageJobRunUsageMetered usage across attempts. Output only.
messagestringWhy the run failed or was refused, when it did. Output only.
schedule_timetimestampStart no earlier than this: set it directly, or through start_delay; at most 365 days ahead. A run cancelled before then makes no attempt.
start_delaydurationStart no earlier than this long after the request.
caller_principal_idstringPrincipal authenticated by Access when the run was created; not caller-writable. Output only.
caller_key_idstringAccess key that created the run; never the key's secret value. Output only.
job_uidstringImmutable Job UID captured with the run's generation and spec. Output only.
job_spec_digeststringSHA-256 of the frozen base Job spec, before this run's overrides. Output only.
stop_verifiedboolTrue only after all dispatched or ambiguously dispatched attempts have an observed stop/retirement receipt. Cancellation acceptance is not proof. Output only.

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

#ScheduleFireRef

FieldTypeWhat it is
schedulestringThe Schedule. Output only.
intended_timetimestampThe instant the fire was due. Output only.

#JobRunUsage

FieldTypeWhat it is
billed_durationdurationSummed wall time of every attempt from start to exit; billed as this duration on instance_type (workflows.job.seconds). Output only.
instance_typestringThe instance type the attempts ran on. Output only.

#Errors

Every error arrives in the body Errors describes.

#Examples

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