Read a job's log bytes from an offset
GET/api/jobs/{job_id}/logs
readJobLogs
Returns the job's raw log bytes from `from_offset` (default 0). The `x-neosource-log-next-offset` response header carries the byte offset to poll from next; an offset at/past the end yields a 200 with an empty body and the same header. `format` selects only how the bytes are labelled — the body is identical either way. `bytes` (the default) sends `application/octet-stream`, which browsers download and byte-polling clients expect; `text` sends `text/plain; charset=utf-8`, which a browser renders in a tab. Both carry `X-Content-Type-Options: nosniff`, since log bytes are attacker-influenced and the response is same-origin with the app.
Authentication optional — this operation also accepts anonymous requests. When authenticating, use a bearer token or a session cookie.
curl
curl -X GET 'https://neosource.dev/api/jobs/JOB_ID/logs' \
-H 'Authorization: Bearer $NEOSOURCE_TOKEN'fetch
fetch("https://neosource.dev/api/jobs/JOB_ID/logs", {
method: "GET",
headers: {
Authorization: "Bearer $NEOSOURCE_TOKEN",
},
});Path parameters
job_idrequired
Query parameters
from_offsetByte offset to read from. Defaults to 0 (the whole log).
formatResponse rendering: `bytes` (the default — `application/octet-stream`, which browsers download) or `text` (`text/plain; charset=utf-8`, which a browser tab renders). The body is the same either way.
Responses
200Raw log bytes
application/octet-stream
403Forbidden — one of: forbidden, needs_scope
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 404Not Found — one of: not_found
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget