List images
curl --request GET \
--url https://api.zode.dev/v1/images \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zode.dev/v1/images"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zode.dev/v1/images', 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.zode.dev/v1/images",
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.zode.dev/v1/images"
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.zode.dev/v1/images")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zode.dev/v1/images")
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{
"images": [
{
"name": "small-v4",
"vcpus": 123,
"ram_mb": 123,
"disk_gb": 123,
"default": true
}
],
"fixed": true,
"regions": [
"<string>"
],
"custom": [
{
"id": "<string>",
"name": "<string>",
"status": "building",
"error": "<string>",
"source_kind": "dockerfile",
"vcpus": 123,
"ram_mb": 123,
"disk_gb": 123,
"base": "<string>",
"region": "<string>",
"log_bytes": 123,
"created_by": {
"member_id": "<string>",
"email": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"dockerfile": "<string>",
"setup": {
"run": [
"<string>"
],
"env": {},
"workdir": "<string>",
"start": "<string>",
"ready": "<string>"
},
"warnings": [
"<string>"
]
}
],
"can_build": true,
"limits": {
"plan": "<string>",
"max_images": 123,
"max_builds": 123,
"images": 123,
"building": 123
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}Images
List images
Base images the fleet can boot, and the workspace’s custom images (owner, admin, member).
One golden image per sandbox size; the first is the default. fixed
is false on a development fleet that takes any shape within the
create limits, and images is then empty. regions are those with
an active node this workspace may use. custom are the workspace’s
own images, newest first, with the plan’s
limits; can_build is false until a node builds images.
GET
/
v1
/
images
List images
curl --request GET \
--url https://api.zode.dev/v1/images \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zode.dev/v1/images"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zode.dev/v1/images', 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.zode.dev/v1/images",
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.zode.dev/v1/images"
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.zode.dev/v1/images")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zode.dev/v1/images")
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{
"images": [
{
"name": "small-v4",
"vcpus": 123,
"ram_mb": 123,
"disk_gb": 123,
"default": true
}
],
"fixed": true,
"regions": [
"<string>"
],
"custom": [
{
"id": "<string>",
"name": "<string>",
"status": "building",
"error": "<string>",
"source_kind": "dockerfile",
"vcpus": 123,
"ram_mb": 123,
"disk_gb": 123,
"base": "<string>",
"region": "<string>",
"log_bytes": 123,
"created_by": {
"member_id": "<string>",
"email": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"dockerfile": "<string>",
"setup": {
"run": [
"<string>"
],
"env": {},
"workdir": "<string>",
"start": "<string>",
"ready": "<string>"
},
"warnings": [
"<string>"
]
}
],
"can_build": true,
"limits": {
"plan": "<string>",
"max_images": 123,
"max_builds": 123,
"images": 123,
"building": 123
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}Authorizations
An API key (zode_tok_...). Create one in the console under API keys (https://console.zode.dev/tokens), or with zode login.
⌘I