Read a bounded slice of a job's output log
Returns the job's output — stdout and stderr interleaved exactly as a terminal would show them. With no range parameters you get the TAIL of the log (default 200 lines), which is what you want for 'how is it going?'. To follow a growing log without re-reading it, feed the previous reply's nextOffsetBytes back as offset_bytes. Every reply is capped at 262144 bytes (256 KiB) decoded, so a huge log is paged rather than dumped; chunk is base64 because process output is arbitrary bytes, not necessarily valid UTF-8. eof: true means you have read to the current end of the file, NOT that the job finished. Unlike /api/v1/exec the job is never killed for producing too much output; truncated: true means the 256 MiB log file itself hit its cap and the agent stopped recording while the job kept running.
Request
- Base URL: https://aicommander.dev
- URL: https://aicommander.dev/api/v1/jobs/{id}/logs
- Auth: one of:
- none
- HTTP bearer
Path parameters
The jobId returned by POST /api/v1/jobs (16 hex characters).
Query parameters
How the user named the machine, passed exactly as given.
Return the last N lines of the log (default 200). Must be an integer of at least 1 — validated, not silently corrected: an out-of-range value is rejected with 400 naming the field. Ignored when offset_bytes is given.
Read forward from this byte offset instead of tailing — pass a previous reply's nextOffsetBytes to follow a growing log. Must be an integer of 0 or more; a negative or fractional value is rejected with 400.
Requested slice size in bytes. Must be an integer from 1 to 262144 (256 KiB — also the default and the hard per-reply ceiling); a larger value is rejected with 400 rather than silently clamped, so page a long log with offset_bytes instead.
Response
One slice of the job's output log.
Changes
No recorded changes to this operation across all 1 revision of this API.