POST /revisions/:id/data/command (Command: close_session)
Requires the write role on the blob.
Request Body
Response
The command returns as soon as the session is marked
closing. Writes are rejected from that moment
on, but the close itself completes in the background — see
Asynchronous behavior.
Errors
Example
Asynchronous behavior
Closing happens in two stages:- Immediately — the session becomes
closingand every mutating operation on it, includingcreate_execution, starts returning409session_not_open. - In the background — every execution still running in the session is stopped and awaited. Once
they are all terminal, the session becomes
closedandsession_closedis emitted.
closed when the command returns. Wait for the session_closed event
or poll Get Session. With executions to stop this
typically takes tens of seconds; with nothing running it is near-immediate.
Executions stopped this way end with status
stopped and do not emit execution_ended — that
event is reserved for executions that complete on their own.
