curl --request POST \
--url https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/machines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "<string>",
"machine_pool_id": "<string>",
"display_name": "<string>"
}
'import requests
url = "https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/machines"
payload = {
"template": "<string>",
"machine_pool_id": "<string>",
"display_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({template: '<string>', machine_pool_id: '<string>', display_name: '<string>'})
};
fetch('https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/machines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/machines"
payload := strings.NewReader("{\n \"template\": \"<string>\",\n \"machine_pool_id\": \"<string>\",\n \"display_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"kind": "persistent",
"display_name": "<string>",
"machine_pool_id": "<string>",
"machine_pool_name": "<string>",
"lifecycle_state": "provisioning",
"connection_state": "online",
"cpu": 2,
"memory_mb": 2,
"created_at": "2023-11-07T05:31:56Z"
}{
"id": "<string>",
"kind": "persistent",
"display_name": "<string>",
"machine_pool_id": "<string>",
"machine_pool_name": "<string>",
"lifecycle_state": "provisioning",
"connection_state": "online",
"cpu": 2,
"memory_mb": 2,
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Create a persistent machine for an agent
Creates one machine for the agent from the requested sold template and disables idle deletion, so the machine stays until it is deleted. The machine is attached to the agent and consumes the project and organization pool-machine quotas like any other pooled machine. The machine pool defaults to the agent’s only pool source.
curl --request POST \
--url https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/machines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "<string>",
"machine_pool_id": "<string>",
"display_name": "<string>"
}
'import requests
url = "https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/machines"
payload = {
"template": "<string>",
"machine_pool_id": "<string>",
"display_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({template: '<string>', machine_pool_id: '<string>', display_name: '<string>'})
};
fetch('https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/machines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/machines"
payload := strings.NewReader("{\n \"template\": \"<string>\",\n \"machine_pool_id\": \"<string>\",\n \"display_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"kind": "persistent",
"display_name": "<string>",
"machine_pool_id": "<string>",
"machine_pool_name": "<string>",
"lifecycle_state": "provisioning",
"connection_state": "online",
"cpu": 2,
"memory_mb": 2,
"created_at": "2023-11-07T05:31:56Z"
}{
"id": "<string>",
"kind": "persistent",
"display_name": "<string>",
"machine_pool_id": "<string>",
"machine_pool_name": "<string>",
"lifecycle_state": "provisioning",
"connection_state": "online",
"cpu": 2,
"memory_mb": 2,
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
An opaque BMA personal or organization bearer token.
Headers
Idempotency key for replay-safe mutating requests.
1 - 255Path Parameters
Organization ID (org_...).
^org_[a-z2-7]{26}$Project ID (proj_...).
^proj_[a-z2-7]{26}$Agent ID (agt_...).
^agt_[a-z2-7]{26}$Body
The sold machine-class template (for example base-2c4g, base-2c8g or base-8c32g). It must be allowed by the machine pool's provider configuration.
1 - 200Machine pool ID (mpo_...).
^mpo_[a-z2-7]{26}$Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.
1 - 64Response
Existing machine returned.
Machine ID (mch_...).
^mch_[a-z2-7]{26}$Persistent machines are kept for a person and never deleted for being idle; ephemeral machines serve turns and are deleted after their idle window.
persistent, ephemeral Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.
1 - 64Machine pool ID (mpo_...).
^mpo_[a-z2-7]{26}$Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.
1 - 64provisioning, provision_failed, active, deleting, delete_failed, deleted online, asleep, offline The machine shape BMA reports, or null before the provider resolves it.
x >= 1The machine shape BMA reports, or null before the provider resolves it.
x >= 1