List sandbox templates
curl --request GET \
--url https://api.coreweave.com/v1/sandboxTemplates \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.coreweave.com/v1/sandboxTemplates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.coreweave.com/v1/sandboxTemplates', 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.coreweave.com/v1/sandboxTemplates",
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.coreweave.com/v1/sandboxTemplates"
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.coreweave.com/v1/sandboxTemplates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coreweave.com/v1/sandboxTemplates")
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{
"sandboxTemplates": [
{
"displayName": "<string>",
"sandboxTemplateId": "<string>",
"spec": {
"containers": [
{
"name": "<string>",
"image": "<string>",
"command": "<string>",
"args": [
"<string>"
],
"environmentVariables": {},
"resources": {
"cpu": "<string>",
"memory": "<string>",
"gpu": {
"count": "<string>",
"type": "<string>",
"memoryGb": "<string>"
}
},
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"volumeMounts": [
{
"volume": "<string>",
"mountPath": "<string>",
"readOnly": true,
"subPath": "<string>"
}
],
"secretStores": [
{
"storeName": "<string>",
"secrets": [
{
"path": "<string>",
"envVar": "<string>",
"field": "<string>"
}
]
}
],
"workingDir": "<string>",
"resourceRequirements": {
"requests": {
"cpu": "<string>",
"memory": "<string>",
"gpu": {
"count": "<string>",
"type": "<string>",
"memoryGb": "<string>"
}
},
"limits": {
"cpu": "<string>",
"memory": "<string>",
"gpu": {
"count": "<string>",
"type": "<string>",
"memoryGb": "<string>"
}
}
},
"securityContext": {
"runAsUser": 123,
"runAsGroup": 123,
"privileged": true,
"allowPrivilegeEscalation": true,
"readOnlyRootFilesystem": true,
"capabilitiesAdd": [
"<string>"
],
"capabilitiesDrop": [
"<string>"
],
"seccompProfile": "<string>"
},
"imagePullCredentials": {
"registry": "<string>",
"credentials": {
"storeName": "<string>",
"path": "<string>",
"field": "<string>"
}
},
"primary": true,
"startupProbe": {
"exec": [
"<string>"
],
"periodSeconds": 123,
"timeoutSeconds": 123,
"failureThreshold": 123,
"initialDelaySeconds": 123
}
}
],
"volumes": [
{
"name": "<string>",
"scratch": {
"size": "<string>",
"medium": "STORAGE_MEDIUM_UNSPECIFIED",
"restoreFromSnapshotId": "<string>"
},
"volumeId": "<string>"
}
],
"services": [
{
"port": 123,
"name": "<string>",
"protocol": "SERVICE_PROTOCOL_UNSPECIFIED",
"visibility": "VISIBILITY_UNSPECIFIED",
"endpoint": {
"kind": "ENDPOINT_KIND_UNSPECIFIED",
"auth": "ENDPOINT_AUTH_UNSPECIFIED",
"requestTimeoutSeconds": 123
}
}
],
"maxLifetimeSeconds": 123,
"networkIds": [
"<string>"
],
"objectStorageAccess": {
"buckets": [
"<string>"
],
"permission": "OBJECT_STORAGE_PERMISSION_UNSPECIFIED",
"objectPrefix": "<string>"
},
"tags": [
"<string>"
],
"runnerIds": [
"<string>"
],
"network": {
"ingress": [
{
"cidr": {
"cidr": "<string>",
"except": [
"<string>"
]
},
"tenant": "TENANT_SCOPE_UNSPECIFIED",
"any": true,
"ports": [
{
"port": 123,
"protocol": "<string>",
"endPort": 123
}
]
}
],
"egress": [
{
"cidr": {
"cidr": "<string>",
"except": [
"<string>"
]
},
"httpsHostname": "<string>",
"tenant": "TENANT_SCOPE_UNSPECIFIED",
"any": true,
"selector": {
"podLabels": {},
"namespaceLabels": {}
},
"ports": [
{
"port": 123,
"protocol": "<string>",
"endPort": 123
}
],
"httpsHostnameExcept": [
"<string>"
]
}
],
"denyEgress": true,
"denyIngress": true,
"dnsEgress": "DNS_EGRESS_MODE_UNSPECIFIED"
},
"annotations": {},
"instanceType": "<string>",
"mode": "SANDBOX_MODE_UNSPECIFIED",
"runtimeClass": "<string>",
"networkConfigId": "<string>",
"runtimeClassSelection": "RUNTIME_CLASS_UNSPECIFIED"
},
"revision": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"deleteTime": "2023-11-07T05:31:56Z",
"createUserId": "<string>",
"deleted": true,
"attachments": {},
"requiresCks": true
}
],
"nextPageToken": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}List sandbox templates
List the sandbox templates in the caller’s organization.
GET
/
v1
/
sandboxTemplates
List sandbox templates
curl --request GET \
--url https://api.coreweave.com/v1/sandboxTemplates \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.coreweave.com/v1/sandboxTemplates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.coreweave.com/v1/sandboxTemplates', 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.coreweave.com/v1/sandboxTemplates",
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.coreweave.com/v1/sandboxTemplates"
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.coreweave.com/v1/sandboxTemplates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coreweave.com/v1/sandboxTemplates")
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{
"sandboxTemplates": [
{
"displayName": "<string>",
"sandboxTemplateId": "<string>",
"spec": {
"containers": [
{
"name": "<string>",
"image": "<string>",
"command": "<string>",
"args": [
"<string>"
],
"environmentVariables": {},
"resources": {
"cpu": "<string>",
"memory": "<string>",
"gpu": {
"count": "<string>",
"type": "<string>",
"memoryGb": "<string>"
}
},
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"volumeMounts": [
{
"volume": "<string>",
"mountPath": "<string>",
"readOnly": true,
"subPath": "<string>"
}
],
"secretStores": [
{
"storeName": "<string>",
"secrets": [
{
"path": "<string>",
"envVar": "<string>",
"field": "<string>"
}
]
}
],
"workingDir": "<string>",
"resourceRequirements": {
"requests": {
"cpu": "<string>",
"memory": "<string>",
"gpu": {
"count": "<string>",
"type": "<string>",
"memoryGb": "<string>"
}
},
"limits": {
"cpu": "<string>",
"memory": "<string>",
"gpu": {
"count": "<string>",
"type": "<string>",
"memoryGb": "<string>"
}
}
},
"securityContext": {
"runAsUser": 123,
"runAsGroup": 123,
"privileged": true,
"allowPrivilegeEscalation": true,
"readOnlyRootFilesystem": true,
"capabilitiesAdd": [
"<string>"
],
"capabilitiesDrop": [
"<string>"
],
"seccompProfile": "<string>"
},
"imagePullCredentials": {
"registry": "<string>",
"credentials": {
"storeName": "<string>",
"path": "<string>",
"field": "<string>"
}
},
"primary": true,
"startupProbe": {
"exec": [
"<string>"
],
"periodSeconds": 123,
"timeoutSeconds": 123,
"failureThreshold": 123,
"initialDelaySeconds": 123
}
}
],
"volumes": [
{
"name": "<string>",
"scratch": {
"size": "<string>",
"medium": "STORAGE_MEDIUM_UNSPECIFIED",
"restoreFromSnapshotId": "<string>"
},
"volumeId": "<string>"
}
],
"services": [
{
"port": 123,
"name": "<string>",
"protocol": "SERVICE_PROTOCOL_UNSPECIFIED",
"visibility": "VISIBILITY_UNSPECIFIED",
"endpoint": {
"kind": "ENDPOINT_KIND_UNSPECIFIED",
"auth": "ENDPOINT_AUTH_UNSPECIFIED",
"requestTimeoutSeconds": 123
}
}
],
"maxLifetimeSeconds": 123,
"networkIds": [
"<string>"
],
"objectStorageAccess": {
"buckets": [
"<string>"
],
"permission": "OBJECT_STORAGE_PERMISSION_UNSPECIFIED",
"objectPrefix": "<string>"
},
"tags": [
"<string>"
],
"runnerIds": [
"<string>"
],
"network": {
"ingress": [
{
"cidr": {
"cidr": "<string>",
"except": [
"<string>"
]
},
"tenant": "TENANT_SCOPE_UNSPECIFIED",
"any": true,
"ports": [
{
"port": 123,
"protocol": "<string>",
"endPort": 123
}
]
}
],
"egress": [
{
"cidr": {
"cidr": "<string>",
"except": [
"<string>"
]
},
"httpsHostname": "<string>",
"tenant": "TENANT_SCOPE_UNSPECIFIED",
"any": true,
"selector": {
"podLabels": {},
"namespaceLabels": {}
},
"ports": [
{
"port": 123,
"protocol": "<string>",
"endPort": 123
}
],
"httpsHostnameExcept": [
"<string>"
]
}
],
"denyEgress": true,
"denyIngress": true,
"dnsEgress": "DNS_EGRESS_MODE_UNSPECIFIED"
},
"annotations": {},
"instanceType": "<string>",
"mode": "SANDBOX_MODE_UNSPECIFIED",
"runtimeClass": "<string>",
"networkConfigId": "<string>",
"runtimeClassSelection": "RUNTIME_CLASS_UNSPECIFIED"
},
"revision": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"deleteTime": "2023-11-07T05:31:56Z",
"createUserId": "<string>",
"deleted": true,
"attachments": {},
"requiresCks": true
}
],
"nextPageToken": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
CoreWeave API access token sent as a bearer token.
Query Parameters
When true, include soft-deleted templates. Requires sandbox_admin. Default false.
Was this page helpful?