Read a background command
What a backgrounded command has printed since you last asked, and whether it is still running.
The read is CONSUMING and the cursor is the daemon’s, not yours: each call returns what has arrived since the previous call and advances the handle’s offset itself. There is nothing to pass — the stdout_offset and stderr_offset on the response are how far it has now read, reported so you can tell how much has gone by, not a parameter to send back. Output you receive and drop is gone.
stdout_b64 and stderr_b64 are base64 and always are; the offsets count the DECODED bytes, which is what makes them line up across polls.
more is the field to poll on: it says there is further output waiting right now.
A handle answers 404 from ten minutes after its command exits, and after the daemon on the computer’s host restarts — the same 404 as a pid that never existed. A stopped or suspended computer answers 409 with reason: "unavailable", and this route does not resume it. A suspended one still holds the command: after a resume, its output and exit code can be read again.
Only commands this API started can be read this way.
Requires the member role or higher.
Request
- Base URL: https://app.mandala.computer/api/v1
- URL: https://app.mandala.computer/api/v1/computers/{id}/exec/{pid}
- Auth: HTTP bearer
Path parameters
The computer id.
The guest pid from a backgrounded exec.
Response
Its state and whatever it has printed since the last read.
Changes
No recorded changes to this operation across all 1 revision of this API.