curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v1/environments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/environments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/environments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.recursion.labelbox.com/managed-agents/v1/environments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.recursion.labelbox.com/managed-agents/v1/environments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.recursion.labelbox.com/managed-agents/v1/environments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/environments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"environments": [
{
"computer_use": true,
"created_at": "2023-11-07T05:31:56Z",
"environment_id": "<string>",
"name": "<string>",
"organization_id": "<string>",
"provider": "<string>",
"resources": {
"accelerator": {
"count": 0,
"name": "<string>",
"type": "<string>"
},
"cpu_milli": 0,
"memory_mib": 0,
"placement": {
"allow_spot": true,
"max_price_per_hour_usd": 123,
"min_accelerator_vram_gb": 0,
"providers": [
"<string>"
],
"regions": [
"<string>"
]
},
"timeout_seconds": 0
},
"scope": "<string>",
"setup": {
"script": "<string>",
"timeout_seconds": 0
},
"updated_at": "2023-11-07T05:31:56Z",
"config": {},
"description": "<string>",
"env_vars": {},
"http_port": 4503599627370495,
"idle_stop_after_seconds": 4503599627370495,
"image": "<string>",
"metadata": {},
"mounts": [
{
"mount_path": "<string>",
"source": "<string>"
}
],
"network_policy": {},
"privileged": true,
"pvc_size_gi": 4503599627370495,
"secrets": {},
"setup_updated_at": "2023-11-07T05:31:56Z",
"setup_updated_by_user_id": "<string>",
"setup_verification": {
"stale": true,
"status": "<string>",
"active_setup_run_id": "<string>",
"at": "2023-11-07T05:31:56Z",
"fingerprint": "<string>",
"image": {
"baseImageDigest": "<string>",
"capturedAt": "2023-11-07T05:31:56Z",
"computeId": "<string>",
"fingerprint": "<string>",
"generation": 0,
"image": "<string>",
"imageId": "<string>",
"runnerImage": "<string>",
"setupRunId": "<string>",
"sizeBytes": 0,
"usable": true,
"warmup": "<string>",
"warmupMessage": "<string>"
},
"imageCapture": {
"at": "2023-11-07T05:31:56Z",
"setupRunId": "<string>",
"status": "failed",
"message": "<string>",
"reason": "<string>"
},
"last_run": {
"setup_run_id": "<string>",
"status": "<string>",
"duration_ms": 0,
"exit_code": 0,
"failed_command": "<string>",
"failed_line": 0,
"hint": "<string>",
"hint_code": "<string>",
"message": "<string>",
"phase": "<string>",
"stderr_tail": "<string>"
},
"setup_run_id": "<string>",
"verified_by_user_id": "<string>"
},
"setup_warnings": [
{
"code": "<string>",
"line": 0,
"message": "<string>"
}
],
"stopped_delete_after_seconds": 4503599627370495,
"template": {
"id": "<string>",
"revision": 0
}
}
]
}{
"code": "invalid_request",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "managed_agents_unavailable",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}List environments
Returns every environment in the calling organization with its full sandbox spec (provider, image, setup, resources, network policy). Soft-deleted environments are omitted, and the response is not paginated.
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v1/environments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/environments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/environments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.recursion.labelbox.com/managed-agents/v1/environments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.recursion.labelbox.com/managed-agents/v1/environments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.recursion.labelbox.com/managed-agents/v1/environments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/environments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"environments": [
{
"computer_use": true,
"created_at": "2023-11-07T05:31:56Z",
"environment_id": "<string>",
"name": "<string>",
"organization_id": "<string>",
"provider": "<string>",
"resources": {
"accelerator": {
"count": 0,
"name": "<string>",
"type": "<string>"
},
"cpu_milli": 0,
"memory_mib": 0,
"placement": {
"allow_spot": true,
"max_price_per_hour_usd": 123,
"min_accelerator_vram_gb": 0,
"providers": [
"<string>"
],
"regions": [
"<string>"
]
},
"timeout_seconds": 0
},
"scope": "<string>",
"setup": {
"script": "<string>",
"timeout_seconds": 0
},
"updated_at": "2023-11-07T05:31:56Z",
"config": {},
"description": "<string>",
"env_vars": {},
"http_port": 4503599627370495,
"idle_stop_after_seconds": 4503599627370495,
"image": "<string>",
"metadata": {},
"mounts": [
{
"mount_path": "<string>",
"source": "<string>"
}
],
"network_policy": {},
"privileged": true,
"pvc_size_gi": 4503599627370495,
"secrets": {},
"setup_updated_at": "2023-11-07T05:31:56Z",
"setup_updated_by_user_id": "<string>",
"setup_verification": {
"stale": true,
"status": "<string>",
"active_setup_run_id": "<string>",
"at": "2023-11-07T05:31:56Z",
"fingerprint": "<string>",
"image": {
"baseImageDigest": "<string>",
"capturedAt": "2023-11-07T05:31:56Z",
"computeId": "<string>",
"fingerprint": "<string>",
"generation": 0,
"image": "<string>",
"imageId": "<string>",
"runnerImage": "<string>",
"setupRunId": "<string>",
"sizeBytes": 0,
"usable": true,
"warmup": "<string>",
"warmupMessage": "<string>"
},
"imageCapture": {
"at": "2023-11-07T05:31:56Z",
"setupRunId": "<string>",
"status": "failed",
"message": "<string>",
"reason": "<string>"
},
"last_run": {
"setup_run_id": "<string>",
"status": "<string>",
"duration_ms": 0,
"exit_code": 0,
"failed_command": "<string>",
"failed_line": 0,
"hint": "<string>",
"hint_code": "<string>",
"message": "<string>",
"phase": "<string>",
"stderr_tail": "<string>"
},
"setup_run_id": "<string>",
"verified_by_user_id": "<string>"
},
"setup_warnings": [
{
"code": "<string>",
"line": 0,
"message": "<string>"
}
],
"stopped_delete_after_seconds": 4503599627370495,
"template": {
"id": "<string>",
"revision": 0
}
}
]
}{
"code": "invalid_request",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "managed_agents_unavailable",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Authorizations
A Recursion API key, created in the console under API keys.
Headers
Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.
1Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.
1Response
Response body of GET /managed-agents/v1/environments. An environment is the sandbox recipe a session runs inside; pick an environment_id from here when starting a session with POST /managed-agents/v1/sessions.
Response body of GET /managed-agents/v1/environments. An environment is the sandbox recipe a session runs inside; pick an environment_id from here when starting a session with POST /managed-agents/v1/sessions.
Every environment in the caller's organization, newest first. Null rather than an empty array when the organization has no environments. Soft-deleted environments are omitted.
Show child attributes
Show child attributes