curl -sS "$BMA_BASE_URL/v1/desktop_sessions/<desktop_session_id>" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "desktop_session",
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_id": "<string>",
"owner_id": "<string>",
"read_only": true,
"closed": true,
"state": "open",
"created_at": "2023-11-07T05:31:56Z",
"capabilities": {
"width": 123,
"height": 123,
"screenshot": true,
"pointer": true,
"keyboard": true,
"text": true,
"webrtc": true,
"rfb_fallback": true,
"takeover": true,
"max_actions_per_second": 123,
"protocol_version": 123,
"control_version": 123,
"transport_fallback_generation": 123,
"native_webrtc": true,
"screen_live": true
},
"control": {
"mode": "paused",
"epoch": 123,
"generation": 123,
"holder": "<string>",
"agent_state": "<string>",
"lease_id": "<string>",
"lease_expires_at": "2023-11-07T05:31:56Z"
},
"agent_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ticket": {
"ticket": "<string>",
"ws_url": "<string>",
"type": "ticket",
"purpose": "watch",
"id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"subprotocol": "<string>",
"permissions": [
"<string>"
],
"machine_id": "<string>",
"desktop_session_id": "<string>",
"viewer": "<string>",
"transport": "livekit",
"room": "<string>",
"publisher_identity": "<string>",
"viewer_identity": "<string>",
"input_identity": "<string>",
"control_available": true
},
"close_reason": "closed_by_user"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}Desktop sessions
Retrieve a desktop session (control state in `control`)
GET
/
v1
/
desktop_sessions
/
{desktop_session_id}
curl -sS "$BMA_BASE_URL/v1/desktop_sessions/<desktop_session_id>" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "desktop_session",
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_id": "<string>",
"owner_id": "<string>",
"read_only": true,
"closed": true,
"state": "open",
"created_at": "2023-11-07T05:31:56Z",
"capabilities": {
"width": 123,
"height": 123,
"screenshot": true,
"pointer": true,
"keyboard": true,
"text": true,
"webrtc": true,
"rfb_fallback": true,
"takeover": true,
"max_actions_per_second": 123,
"protocol_version": 123,
"control_version": 123,
"transport_fallback_generation": 123,
"native_webrtc": true,
"screen_live": true
},
"control": {
"mode": "paused",
"epoch": 123,
"generation": 123,
"holder": "<string>",
"agent_state": "<string>",
"lease_id": "<string>",
"lease_expires_at": "2023-11-07T05:31:56Z"
},
"agent_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ticket": {
"ticket": "<string>",
"ws_url": "<string>",
"type": "ticket",
"purpose": "watch",
"id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"subprotocol": "<string>",
"permissions": [
"<string>"
],
"machine_id": "<string>",
"desktop_session_id": "<string>",
"viewer": "<string>",
"transport": "livekit",
"room": "<string>",
"publisher_identity": "<string>",
"viewer_identity": "<string>",
"input_identity": "<string>",
"control_available": true
},
"close_reason": "closed_by_user"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}Headers
Response
Success.
A screen capture answers starting until the machine confirms it publishes (then live); tickets are issued and viewers connect meanwhile and receive the track once published. A start the machine does not confirm closes the session.
Available options:
open, starting, live, closing, closed Why the session ended, present once it is closed. capture_refused - the machine refused to publish its screen (opening again gets the same answer until something changes on the machine); capture_unconfirmed - the machine did not confirm the start in time; capture_lost - the machine stopped renewing a running capture; expired - the keepalive passed; closed_by_user - closed through POST /v1/desktop_sessions/{desktop_session_id}/close.
Available options:
closed_by_user, expired, capture_refused, capture_unconfirmed, capture_lost