List environments
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v2/environments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v2/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/v2/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/v2/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/v2/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/v2/environments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v2/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{
"items": [
{
"computerUse": true,
"createdAt": "2023-11-07T05:31:56Z",
"environmentId": "<string>",
"name": "<string>",
"organizationId": "<string>",
"provider": "<string>",
"resources": {
"accelerator": {
"count": 0,
"name": "<string>",
"type": "<string>"
},
"cpuMilli": 0,
"memoryMib": 0,
"placement": {
"allowSpot": true,
"maxPricePerHourUsd": 123,
"minAcceleratorVramGb": 0,
"providers": [
"<string>"
],
"regions": [
"<string>"
]
},
"timeoutSeconds": 0
},
"scope": "<string>",
"setup": {
"script": "<string>",
"timeoutSeconds": 0
},
"updatedAt": "2023-11-07T05:31:56Z",
"config": {},
"description": "<string>",
"envVars": {},
"httpPort": 4503599627370495,
"idleStopAfterSeconds": 4503599627370495,
"image": "<string>",
"metadata": {},
"mounts": [
{
"mountPath": "<string>",
"source": "<string>"
}
],
"networkPolicy": {},
"privileged": true,
"pvcSizeGi": 4503599627370495,
"secrets": {},
"setupUpdatedAt": "2023-11-07T05:31:56Z",
"setupUpdatedByUserId": "<string>",
"setupVerification": {
"stale": true,
"status": "<string>",
"activeSetupRunId": "<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>"
},
"lastRun": {
"setupRunId": "<string>",
"status": "<string>",
"durationMs": 0,
"exitCode": 0,
"failedCommand": "<string>",
"failedLine": 0,
"hint": "<string>",
"hintCode": "<string>",
"message": "<string>",
"phase": "<string>",
"stderrTail": "<string>"
},
"setupRunId": "<string>",
"verifiedByUserId": "<string>"
},
"setupWarnings": [
{
"code": "<string>",
"line": 0,
"message": "<string>"
}
],
"stoppedDeleteAfterSeconds": 4503599627370495,
"template": {
"id": "<string>",
"revision": 0
}
}
],
"nextCursor": "<string>"
}{
"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
}
}Environments
List environments
Returns a page of environments in the calling organization, newest first. Soft-deleted environments are omitted. Follow nextCursor with the cursor query parameter until it is null to retrieve every environment.
GET
/
managed-agents
/
v2
/
environments
List environments
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v2/environments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v2/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/v2/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/v2/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/v2/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/v2/environments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v2/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{
"items": [
{
"computerUse": true,
"createdAt": "2023-11-07T05:31:56Z",
"environmentId": "<string>",
"name": "<string>",
"organizationId": "<string>",
"provider": "<string>",
"resources": {
"accelerator": {
"count": 0,
"name": "<string>",
"type": "<string>"
},
"cpuMilli": 0,
"memoryMib": 0,
"placement": {
"allowSpot": true,
"maxPricePerHourUsd": 123,
"minAcceleratorVramGb": 0,
"providers": [
"<string>"
],
"regions": [
"<string>"
]
},
"timeoutSeconds": 0
},
"scope": "<string>",
"setup": {
"script": "<string>",
"timeoutSeconds": 0
},
"updatedAt": "2023-11-07T05:31:56Z",
"config": {},
"description": "<string>",
"envVars": {},
"httpPort": 4503599627370495,
"idleStopAfterSeconds": 4503599627370495,
"image": "<string>",
"metadata": {},
"mounts": [
{
"mountPath": "<string>",
"source": "<string>"
}
],
"networkPolicy": {},
"privileged": true,
"pvcSizeGi": 4503599627370495,
"secrets": {},
"setupUpdatedAt": "2023-11-07T05:31:56Z",
"setupUpdatedByUserId": "<string>",
"setupVerification": {
"stale": true,
"status": "<string>",
"activeSetupRunId": "<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>"
},
"lastRun": {
"setupRunId": "<string>",
"status": "<string>",
"durationMs": 0,
"exitCode": 0,
"failedCommand": "<string>",
"failedLine": 0,
"hint": "<string>",
"hintCode": "<string>",
"message": "<string>",
"phase": "<string>",
"stderrTail": "<string>"
},
"setupRunId": "<string>",
"verifiedByUserId": "<string>"
},
"setupWarnings": [
{
"code": "<string>",
"line": 0,
"message": "<string>"
}
],
"stoppedDeleteAfterSeconds": 4503599627370495,
"template": {
"id": "<string>",
"revision": 0
}
}
],
"nextCursor": "<string>"
}{
"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.
Minimum string length:
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.
Minimum string length:
1Query Parameters
Maximum environments per page, default 50.
Required range:
1 <= x <= 100Opaque nextCursor from the previous page with the same limit.