curl -sS "$BMA_BASE_URL/v1/machines" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"data": [
{
"type": "machine",
"id": "<string>",
"org_id": "<string>",
"source_kind": "byo",
"agent_ids": [
"<string>"
],
"machine_pool_id": "<string>",
"display_name": "<string>",
"description": "<string>",
"provider": "<string>",
"lifecycle_state": "provisioning",
"connection_state": "online",
"connection_state_reason": "<string>",
"power_state": "running",
"last_observed_at": "2023-11-07T05:31:56Z",
"cwd": "<string>",
"env": {},
"secret_env": {},
"lifecycle_reason_code": "<string>",
"lifecycle_reason_message": "<string>",
"failure_report": {
"stage": "startup_script",
"output_tail": "<string>",
"output_truncated": true,
"reported_at": "2023-11-07T05:31:56Z",
"exit_status": 123,
"daemon_version": "<string>",
"target_version": "<string>"
},
"next_reconcile_after": "2023-11-07T05:31:56Z",
"provision_attempts": 123,
"delete_attempts": 123,
"metadata": {},
"deleted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"kind": "persistent",
"machine_pool_name": "<string>",
"cpu": 2,
"memory_mb": 2,
"agent_id": "<string>",
"capabilities": {
"machine_id": "<string>",
"terminal": {
"supported": true,
"reason": "<string>"
},
"session_files": {
"declared": true
},
"desktop": {
"supported": true,
"webrtc": true,
"rfb": true,
"livekit": true,
"control": true,
"native_webrtc": true,
"reason": "<string>"
},
"permissions": {
"terminal": true,
"desktop_watch": true,
"desktop_control": true
},
"protocol_versions": {
"terminal": 123,
"desktop": 123
},
"harnesses": [
"<string>"
]
},
"token": "<string>",
"token_record": {
"id": "<string>",
"org_id": "<string>",
"machine_id": "<string>",
"name": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"revoke_reason": "<string>"
},
"project_grants": [
{
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_id": "<string>",
"source_kind": "explicit",
"description": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"project_machine_pool_grant_id": "<string>"
}
]
}
],
"next_page": "<string>"
}{
"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>"
}Machines
List machines
persistent=true lists only persistent machines (the workspace’s computers). Deprecated: agent_id lists that agent’s machines (project scope, native listAgentMachines).
GET
/
v1
/
machines
curl -sS "$BMA_BASE_URL/v1/machines" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"data": [
{
"type": "machine",
"id": "<string>",
"org_id": "<string>",
"source_kind": "byo",
"agent_ids": [
"<string>"
],
"machine_pool_id": "<string>",
"display_name": "<string>",
"description": "<string>",
"provider": "<string>",
"lifecycle_state": "provisioning",
"connection_state": "online",
"connection_state_reason": "<string>",
"power_state": "running",
"last_observed_at": "2023-11-07T05:31:56Z",
"cwd": "<string>",
"env": {},
"secret_env": {},
"lifecycle_reason_code": "<string>",
"lifecycle_reason_message": "<string>",
"failure_report": {
"stage": "startup_script",
"output_tail": "<string>",
"output_truncated": true,
"reported_at": "2023-11-07T05:31:56Z",
"exit_status": 123,
"daemon_version": "<string>",
"target_version": "<string>"
},
"next_reconcile_after": "2023-11-07T05:31:56Z",
"provision_attempts": 123,
"delete_attempts": 123,
"metadata": {},
"deleted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"kind": "persistent",
"machine_pool_name": "<string>",
"cpu": 2,
"memory_mb": 2,
"agent_id": "<string>",
"capabilities": {
"machine_id": "<string>",
"terminal": {
"supported": true,
"reason": "<string>"
},
"session_files": {
"declared": true
},
"desktop": {
"supported": true,
"webrtc": true,
"rfb": true,
"livekit": true,
"control": true,
"native_webrtc": true,
"reason": "<string>"
},
"permissions": {
"terminal": true,
"desktop_watch": true,
"desktop_control": true
},
"protocol_versions": {
"terminal": 123,
"desktop": 123
},
"harnesses": [
"<string>"
]
},
"token": "<string>",
"token_record": {
"id": "<string>",
"org_id": "<string>",
"machine_id": "<string>",
"name": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"revoke_reason": "<string>"
},
"project_grants": [
{
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_id": "<string>",
"source_kind": "explicit",
"description": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"project_machine_pool_grant_id": "<string>"
}
]
}
],
"next_page": "<string>"
}{
"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>"
}