Menu
Platform
AI
App store purchases
Database
Flags
Jobs and cron
Localization
Monitoring
Notifications
Payments
Queues
Sandboxes
Webhooks
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
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:read - Effect
read— nothing is written. - Collection job_runs
- Query
page_size,page_token,wait
#Request
| Field | Type | What it is |
|---|---|---|
name | string | The name of the job run. Required. |
page_size | int32 | At most this many lines; default 500, clamped to 5000. |
page_token | string | next_page_token of the previous page. |
wait | duration | On a running run, wait up to this long (at most 30s) for new lines before returning an empty page. |
#Response
| Field | Type | What it is |
|---|---|---|
lines | JobLogLine[] | The page, oldest first. |
next_page_token | string | The 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
| Field | Type | What it is |
|---|---|---|
write_time | timestamp | When the line was written. Output only. |
attempt | int32 | The attempt that wrote it, from 1. Output only. |
stream | string | stdout or stderr. Output only. |
text | string | The line, without its trailing newline. Output only. |
#Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.PAGE_TOKEN_MISMATCH— A page token was reused with different parameters.
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"