Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

sylphx workflows job_runs

Every sylphx workflows job_runs command: its argument, its flags and a run line.

The job_runs commands of Sylphx Workflows, as the CLI spells them: the same calls as the job_runs API page, typed for the shell. Install, sign in and the grammar are on the CLI index.

#run

Starts a run of a Job now. The same Idempotency-Key returns the same run for 24h; a Schedule fire uses {job}:{intended time}. With concurrency forbid, a start while a run is active fails with INVALID_STATE.

ID — The id segment of the new Resource's name; the server assigns one when omitted.

CLI

Shell
sylphx workflows job-runs run --parent orgs/acme/projects/shop/envs/production/jobs/job

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs · scope workflows:run · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--parentstringThe parent to create in; defaults to the linked project or the key's scope.
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--argsstringArguments of this run (the Job's when empty). Repeat the flag for each value.
--envkey=valueEnvironment overrides of this run. Repeat the flag for each value.
--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.
--dry-runboolValidate and print the result without writing (validate_only).

#get

Gets a job run.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx workflows job-runs get orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run · scope workflows:read · effect read · Request, response and examples

#list

Lists a job's runs, newest first.

PARENT — optional: the CLI fills it from the linked project or the key's scope when it is left out.

CLI

Shell
sylphx workflows job-runs list orgs/acme/projects/shop/envs/production/jobs/job

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs · scope workflows:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--page-sizeintAt most this many; default 50, clamped to 1000.
--page-tokenstringnext_page_token of the previous page.
--filterstringAIP-160 filter over labels and filterable fields.
--order-bystringAIP-132 ordering over filterable fields.

#cancel

Cancels a job run: SIGTERM, then SIGKILL after 30s. A closed run fails with INVALID_STATE.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx workflows job-runs cancel orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run --yes

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run:cancel · scope workflows:run · effect destructive · Request, response and examples

Flags

FlagTypeWhat it does
--reasonstringWhy the run is cancelled.
--yesboolDo not ask before this destructive call.

#read-logs

Reads a page of a job run's log lines, oldest first. With wait, an empty page on a running run waits up to that long for new lines, so a client follows the log by passing each next_page_token back.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx workflows job-runs read-logs orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run:readLogs · scope workflows:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--page-sizeintAt most this many lines; default 500, clamped to 5000.
--page-tokenstringnext_page_token of the previous page.
--waitdurationOn a running run, wait up to this long (at most 30s) for new lines before returning an empty page.