List machines
curl --request GET \
--url https://api.staging.bma.beeos.ai/v1/machines \
--header 'x-api-key: <api-key>'import requests
url = "https://api.staging.bma.beeos.ai/v1/machines"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.staging.bma.beeos.ai/v1/machines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.bma.beeos.ai/v1/machines"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"type": "machine",
"id": "<string>",
"org_id": "<string>",
"source_kind": "byo",
"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": {
"type": "machine_capabilities",
"machine_id": "<string>",
"terminal": {
"supported": true,
"reason": "<string>"
},
"session_files": {
"declared": true
},
"desktop": {
"supported": true,
"webrtc": true,
"rfb": true,
"reason": "<string>"
},
"permissions": {
"terminal": true,
"desktop_watch": true,
"desktop_control": true
},
"protocol_versions": {
"terminal": 123,
"desktop": 123
}
},
"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
agent_id lists that agent’s machines (project scope).
GET
/
machines
List machines
curl --request GET \
--url https://api.staging.bma.beeos.ai/v1/machines \
--header 'x-api-key: <api-key>'import requests
url = "https://api.staging.bma.beeos.ai/v1/machines"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.staging.bma.beeos.ai/v1/machines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.bma.beeos.ai/v1/machines"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"type": "machine",
"id": "<string>",
"org_id": "<string>",
"source_kind": "byo",
"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": {
"type": "machine_capabilities",
"machine_id": "<string>",
"terminal": {
"supported": true,
"reason": "<string>"
},
"session_files": {
"declared": true
},
"desktop": {
"supported": true,
"webrtc": true,
"rfb": true,
"reason": "<string>"
},
"permissions": {
"terminal": true,
"desktop_watch": true,
"desktop_control": true
},
"protocol_versions": {
"terminal": 123,
"desktop": 123
}
},
"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>"
}