MIRAGE_AUTH_TOKEN to your server’s configured token, or
omit the authorization header in local mode without a token.
Stream command output
The server supports streaming shell output. Setstream=true and use
curl --no-buffer to display the response as it arrives:
application/x-ndjson. Each line is a JSON record.
Output records identify stdout or stderr and carry base64-encoded data:
data to display the bytes. The output example decodes
to hello\n on stdout. Records labeled stderr carry stderr bytes in the same format.
Read through the final record:
A stream without a final status record was interrupted. HTTP
200 alone does not
mean the shell command succeeded. Closing the request cancels the running line.
Streaming cannot be combined with explain.
The server includes line_id in the result. Use it to get the line record.
Send stdin
The server acceptsmultipart/form-data with a JSON request part followed by
a stdin part. It accepts up to 64 MiB of input and supplies the bytes to the command
as they arrive.
a\nb\n in stdout.
See Run a shell line for the complete
request fields and response schemas.