Guest console and recovery API

Guest console and recovery API

Create short-lived terminal sessions and change the guest boot source for rescue.

Guest-access endpoints authorize console sessions and recovery boot operations. They do not create an operating system account or bypass the guest's own login.

Console session

POST/organizations/{organization_id}/projects/{project_id}/droplets/{droplet_id}/console-sessions
Scope
droplets:console
Auth
Bearer API key

Creates an expiring console session for the target droplet.

Send an optional ttl_seconds, default 300, integer 60–900 inclusive. Returns 201 with session ID, expiry, and a short-lived connection URL. The caller also needs Guest Console permission on the target.

The URL is a credential. It is revealed once, excluded from ordinary audit payloads, and must not be placed in shared logs or a durable dashboard. Replaying a creation intent does not extend an existing session's expiry.

DELETE/organizations/{organization_id}/projects/{project_id}/console-sessions/{session_id}
Scope
droplets:console
Auth
Bearer API key

Revokes the managed connection and returns 204. A caller can revoke its own session or use the separately authorized session-administration permission. Closing the transport does not guarantee that a shell left logged in on the serial device has logged out.

Enter rescue mode

POST/organizations/{organization_id}/projects/{project_id}/droplets/{droplet_id}/recovery-actions
Scope
droplets:recovery
Auth
Bearer API key

Requests rescue boot while retaining the original root volume.

Requires droplets:recovery, Guest Recovery permission, If-Match, and a stopped droplet. Send type=enter_rescue and a permitted rescue_image_id.

To boot the approved rescue image, send this action body:

JSON
{
  "type": "enter_rescue",
  "rescue_image_id": "img_recovery_approved"
}

Accepted work returns 202 with an operation. Infra records the original boot source and attaches the recovery image without formatting the retained root volume. An incompatible image returns 422 invalid_recovery_image.

Leave rescue mode

POST/organizations/{organization_id}/projects/{project_id}/droplets/{droplet_id}/recovery-actions
Scope
droplets:recovery
Auth
Bearer API key

Restores the recorded normal boot configuration after rescue.

Send type=exit_rescue to the same recovery-action path after shutting down the rescue guest. The original root attachment must remain valid, or the request requires an explicitly selected compatible replacement root.

A completed exit restores boot configuration; it does not start the guest unless an explicit start action follows. Writes made to mounted disks during rescue remain real changes after exit.

Session and operation state

A console session can expire while a rescue operation continues. Session expiry is not cancellation of the underlying recovery action. Read its operation ID and current recovery mode before issuing another boot-source change.

A failed rescue boot leaves retained disks available. Use rescue mode for device identification and Guest access for ordinary SSH. Temporary grants can authorize a limited recovery window without making Guest Recovery a permanent project role.

Brokered access and recordings

POST/organizations/{organization_id}/projects/{project_id}/droplets/{droplet_id}/broker-sessions
Scope
sessions:connect
Auth
Bearer API key

Creates a brokered session using an approved connection profile.

Requires sessions:connect and an approved connection_profile_id. The profile selects SSH, RDP, or terminal mode and its credential source. The response identifies session ID, expiry, connection URL, and actual recording mode.

GET/organizations/{organization_id}/projects/{project_id}/session-recordings/{recording_id}
Scope
sessions:recordings_read
Auth
Bearer API key

Returns recording state under the target's recording permissions.

Requires sessions:recordings_read and target recording permission. A recording can be pending, complete, incomplete, or expired. Export additionally requires sessions:recordings_export and an approved archive destination.

Do not treat a missing recording as evidence that no session activity occurred. See brokered sessions and security-key enforcement.

Export a session recording

POST/organizations/{organization_id}/projects/{project_id}/session-recordings/{recording_id}/exports
Scope
sessions:recordings_export
Auth
Bearer API key

Exports a session recording to an approved destination.

Send an approved destination_id. Requires recording export permission and returns 202 with an export operation. An incomplete or expired recording cannot be presented as a complete session archive.