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.
The command raises session.closing on the session’s stream. See
Types.
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. execution.ended is best-effort, so do not wait on it to
learn that an execution has ended: read the execution’s status, or wait for session.closed.
