List the pool grants of a project
curl --request GET \
--url https://api.staging.bma.beeos.ai/v1/machine_pools/{pool_id}/grants \
--header 'x-api-key: <api-key>'import requests
url = "https://api.staging.bma.beeos.ai/v1/machine_pools/{pool_id}/grants"
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/machine_pools/{pool_id}/grants', 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/machine_pools/{pool_id}/grants"
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_pool_grant",
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_pool_id": "<string>",
"description": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env_overlay": {},
"default_machine_secret_env_overlay": {},
"default_machine_provider_options_overlay": {},
"default_cwd": "<string>",
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 0,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"machine_pool": {
"type": "machine_pool",
"id": "<string>",
"org_id": "<string>",
"name": "<string>",
"management_kind": "tenant",
"description": "<string>",
"provider": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env": {},
"default_machine_secret_env": {},
"default_machine_provider_options": {},
"default_cwd": "<string>",
"provider_config": {},
"runtime_protection_enabled": true,
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 1073741826,
"pause_after_idle_minutes": 1073741826,
"archive_after_paused_days": 1825,
"delete_after_paused_days": 1825,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"provider_auth_secret_id": "<string>",
"usage": {
"machines": 1,
"cpu": 1,
"memory_mb": 1
}
}
}
],
"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>"
}Machine pools
List the pool grants of a project
The project is the project_id query parameter or x-bma-project-id.
GET
/
machine_pools
/
{pool_id}
/
grants
List the pool grants of a project
curl --request GET \
--url https://api.staging.bma.beeos.ai/v1/machine_pools/{pool_id}/grants \
--header 'x-api-key: <api-key>'import requests
url = "https://api.staging.bma.beeos.ai/v1/machine_pools/{pool_id}/grants"
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/machine_pools/{pool_id}/grants', 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/machine_pools/{pool_id}/grants"
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_pool_grant",
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_pool_id": "<string>",
"description": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env_overlay": {},
"default_machine_secret_env_overlay": {},
"default_machine_provider_options_overlay": {},
"default_cwd": "<string>",
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 0,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"machine_pool": {
"type": "machine_pool",
"id": "<string>",
"org_id": "<string>",
"name": "<string>",
"management_kind": "tenant",
"description": "<string>",
"provider": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env": {},
"default_machine_secret_env": {},
"default_machine_provider_options": {},
"default_cwd": "<string>",
"provider_config": {},
"runtime_protection_enabled": true,
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 1073741826,
"pause_after_idle_minutes": 1073741826,
"archive_after_paused_days": 1825,
"delete_after_paused_days": 1825,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"provider_auth_secret_id": "<string>",
"usage": {
"machines": 1,
"cpu": 1,
"memory_mb": 1
}
}
}
],
"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>"
}Authorizations
apiKeybearer
Headers
Project scope. Required when the API key can access more than one project (alias: anthropic-workspace-id).
Path Parameters
Query Parameters
Required range:
x >= 1Opaque cursor from next_page.