Sandboxes
Get sandbox configuration
Gets the regions where you can create a sandbox.
GET
/
v1
/
sandboxes
/
configuration
Get sandbox configuration
curl --request GET \
--url https://api.baseten.co/v1/sandboxes/configuration \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.baseten.co/v1/sandboxes/configuration"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.baseten.co/v1/sandboxes/configuration', 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.baseten.co/v1/sandboxes/configuration",
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.baseten.co/v1/sandboxes/configuration"
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.baseten.co/v1/sandboxes/configuration")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baseten.co/v1/sandboxes/configuration")
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{
"regions": [
{
"name": "us-was-1",
"country": "us",
"continent": "na",
"location": "Washington",
"info_generation": "CARBON"
}
]
}{
"code": "INVALID_REQUEST",
"message": "One or more request parameters are invalid.",
"details": {
"request_id": "a3b7c4d2-91e6-4f08-9b5a-2c6d7e8f1043"
}
}{
"code": "UNAUTHORIZED",
"message": "Provide a valid authentication token in the Authorization header.",
"details": {
"header": "Authorization"
}
}{
"code": "FORBIDDEN",
"message": "This authentication token does not grant permission to perform this operation.",
"details": {
"request_id": "a3b7c4d2-91e6-4f08-9b5a-2c6d7e8f1043"
}
}{
"code": "RATE_LIMITED",
"message": "Too many requests. Try again in 30 seconds.",
"details": {
"retry_after_seconds": 30
}
}{
"code": "INTERNAL_ERROR",
"message": "The request could not be completed. Try again later.",
"details": {
"request_id": "a3b7c4d2-91e6-4f08-9b5a-2c6d7e8f1043"
}
}Configuration is the same for every team, so the request doesn’t select a team.
Use a returned region when you create a sandbox.
Authorizations
Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.
Response
Successful operation.
Available Carbon-compatible regions, sorted by name. Empty when none are available.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Get sandbox configuration
curl --request GET \
--url https://api.baseten.co/v1/sandboxes/configuration \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.baseten.co/v1/sandboxes/configuration"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.baseten.co/v1/sandboxes/configuration', 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.baseten.co/v1/sandboxes/configuration",
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.baseten.co/v1/sandboxes/configuration"
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.baseten.co/v1/sandboxes/configuration")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baseten.co/v1/sandboxes/configuration")
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{
"regions": [
{
"name": "us-was-1",
"country": "us",
"continent": "na",
"location": "Washington",
"info_generation": "CARBON"
}
]
}{
"code": "INVALID_REQUEST",
"message": "One or more request parameters are invalid.",
"details": {
"request_id": "a3b7c4d2-91e6-4f08-9b5a-2c6d7e8f1043"
}
}{
"code": "UNAUTHORIZED",
"message": "Provide a valid authentication token in the Authorization header.",
"details": {
"header": "Authorization"
}
}{
"code": "FORBIDDEN",
"message": "This authentication token does not grant permission to perform this operation.",
"details": {
"request_id": "a3b7c4d2-91e6-4f08-9b5a-2c6d7e8f1043"
}
}{
"code": "RATE_LIMITED",
"message": "Too many requests. Try again in 30 seconds.",
"details": {
"retry_after_seconds": 30
}
}{
"code": "INTERNAL_ERROR",
"message": "The request could not be completed. Try again later.",
"details": {
"request_id": "a3b7c4d2-91e6-4f08-9b5a-2c6d7e8f1043"
}
}