Terminate session (keep for restore)
POST/v1/workspaces/:workspaceId/sessions/:sessionId/terminate
Stops the session's VM but keeps its disk, so the session stays listed as terminated and can be restored later. Use only when you intend to restore the session; otherwise call DeleteSession, which works on running sessions too and frees the disk. Where the feature is enabled for the workspace, a caller holding the workspace's billing-view permission (workspace owners and billing-managing custom roles) may terminate any session of the workspace, including another member's; the usage report lists them. A Workspace API Token (bitwat_…) may do the same when it was created with Remote Dev Environments access and a workspace role that can manage the workspace (Manager, or a custom role with Modify workspace settings); any other workspace token, and a session token, keeps its own reach. Terminate is the only session operation this widens. The session returned for another owner's session carries only its id, name, status, owner and timestamps.
RequestClick to copy link
ResponsesClick to copy link
- 200
A successful response.