Skip to content
Console
On this page

Read logs on a job run

Reads a page of a job run's log lines, oldest first.

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.

  • Path GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run:readLogs
  • Scope workflows:run
  • Effect read — nothing is written.
  • Collection job_runs
  • Query page_size, page_token, wait

Request

FieldTypeWhat it is
namestringThe name of the job run. Required.
page_sizeint32At 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.

Response

FieldTypeWhat it is
linesJobLogLine[]The page, oldest first.
next_page_tokenstringThe token of the next page. It is set while the run can still write, so a follower keeps polling; empty once the run closed and every line was read.

JobLogLine

FieldTypeWhat it is
write_timetimestampWhen the line was written. Output only.
attemptint32The attempt that wrote it, from 1. Output only.
streamstringstdout or stderr. Output only.
textstringThe line, without its trailing newline. Output only.

Errors

Every error arrives in the body Errors describes.

Examples

curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/jobs/job/job_runs/job-run:readLogs" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"