Machines
List Versions
List all versions of the configuration for a specific Machine within an app.
GET
/
v1
/
apps
/
{app_name}
/
machines
/
{machine_id}
/
versions
List Versions
curl --request GET \
--url https://api.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions', 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.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions",
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.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions"
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.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions")
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[
{
"user_config": {
"auto_destroy": true,
"cache_drive": {
"size_mb": 123
},
"checks": {},
"containers": [
{
"cmd": [
"<string>"
],
"depends_on": [
{
"condition": "<unknown>",
"name": "<string>"
}
],
"entrypoint": [
"<string>"
],
"env": {},
"env_from": [
{
"env_var": "<string>",
"field_ref": "id"
}
],
"exec": [
"<string>"
],
"files": [
{
"guest_path": "<string>",
"image_config": "<string>",
"mode": 123,
"raw_value": "<string>",
"secret_name": "<string>"
}
],
"healthchecks": [
{
"exec": {
"command": [
"<string>"
]
},
"failure_threshold": 123,
"grace_period": 123,
"http": {
"headers": [
{
"name": "<string>",
"values": [
"<string>"
]
}
],
"method": "<string>",
"path": "<string>",
"port": 123,
"scheme": "<unknown>",
"tls_server_name": "<string>",
"tls_skip_verify": true
},
"interval": 123,
"kind": "<unknown>",
"name": "<string>",
"success_threshold": 123,
"tcp": {
"port": 123
},
"timeout": 123,
"unhealthy": "<unknown>"
}
],
"image": "<string>",
"name": "<string>",
"restart": {
"max_retries": 123,
"policy": "no"
},
"secrets": [
{
"env_var": "<string>",
"name": "<string>"
}
],
"stop": {
"signal": "SIGHUP",
"timeout": "10s"
},
"user": "<string>"
}
],
"disable_machine_autostart": true,
"dns": {
"dns_forward_rules": [
{
"addr": "<string>",
"basename": "<string>"
}
],
"hostname": "<string>",
"hostname_fqdn": "<string>",
"nameservers": [
"<string>"
],
"options": [
{
"name": "<string>",
"value": "<string>"
}
],
"searches": [
"<string>"
],
"skip_registration": true
},
"env": {},
"files": [
{
"guest_path": "<string>",
"image_config": "<string>",
"mode": 123,
"raw_value": "<string>",
"secret_name": "<string>"
}
],
"guest": {
"cpu_kind": "<string>",
"cpus": 123,
"gpu_kind": "<string>",
"gpus": 123,
"host_dedication_id": "<string>",
"kernel_args": [
"<string>"
],
"max_memory_mb": 123,
"memory_mb": 123,
"persist_rootfs": "never",
"required_host_features": [
"<string>"
]
},
"image": "<string>",
"init": {
"cmd": [
"<string>"
],
"entrypoint": [
"<string>"
],
"exec": [
"<string>"
],
"kernel_args": [
"<string>"
],
"swap_size_mb": 123,
"tty": true
},
"metadata": {},
"metrics": {
"https": true,
"path": "<string>",
"port": 123
},
"mounts": [
{
"add_size_gb": 123,
"add_size_percent": 123,
"encrypted": true,
"extend_threshold_percent": 123,
"min_add_size_gb": 123,
"name": "<string>",
"path": "<string>",
"size_gb": 123,
"size_gb_limit": 123,
"volume": "<string>"
}
],
"processes": [
{
"cmd": [
"<string>"
],
"entrypoint": [
"<string>"
],
"env": {},
"env_from": [
{
"env_var": "<string>",
"field_ref": "id"
}
],
"exec": [
"<string>"
],
"ignore_app_secrets": true,
"secrets": [
{
"env_var": "<string>",
"name": "<string>"
}
],
"user": "<string>"
}
],
"restart": {
"max_retries": 123,
"policy": "no"
},
"rootfs": {
"persist": "never",
"size_gb": 123
},
"schedule": "<string>",
"services": [
{
"autostart": true,
"autostop": "off",
"checks": [
{
"grace_period": "1s",
"headers": [
{
"name": "<string>",
"values": [
"<string>"
]
}
],
"interval": "15s",
"method": "<string>",
"path": "<string>",
"port": 123,
"protocol": "<string>",
"timeout": "2s",
"tls_server_name": "<string>",
"tls_skip_verify": true,
"type": "<string>"
}
],
"concurrency": {
"hard_limit": 123,
"soft_limit": 123,
"type": "<string>"
},
"force_instance_description": "<string>",
"force_instance_key": "<string>",
"internal_port": 123,
"min_machines_running": 123,
"ports": [
{
"end_port": 123,
"force_https": true,
"handlers": [
"<string>"
],
"http_options": {
"compress": true,
"h2_backend": true,
"headers_read_timeout": 123,
"idle_timeout": 123,
"replay_cache": [
{
"allow_bypass": true,
"name": "<string>",
"path_prefix": "<string>",
"ttl_seconds": 123,
"type": "cookie"
}
],
"response": {
"headers": {},
"pristine": true
}
},
"port": 123,
"proxy_proto_options": {
"fly_src": true,
"version": "<string>"
},
"start_port": 123,
"tls_options": {
"alpn": [
"<string>"
],
"default_self_signed": true,
"versions": [
"<string>"
]
}
}
],
"protocol": "<string>"
}
],
"size": "<string>",
"spot": {
"max_price_fraction": 123
},
"standbys": [
"<string>"
],
"statics": [
{
"guest_path": "<string>",
"url_prefix": "<string>",
"index_document": "<string>",
"tigris_bucket": "<string>"
}
],
"stop_config": {
"signal": "SIGHUP",
"timeout": "10s"
}
},
"version": "<string>"
}
]Authorizations
A Fly API token with access to the requested organization or resource. Send it as Authorization: Bearer <Fly API token>.
⌘I
List Versions
curl --request GET \
--url https://api.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions', 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.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions",
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.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions"
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.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.machines.dev/v1/apps/{app_name}/machines/{machine_id}/versions")
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[
{
"user_config": {
"auto_destroy": true,
"cache_drive": {
"size_mb": 123
},
"checks": {},
"containers": [
{
"cmd": [
"<string>"
],
"depends_on": [
{
"condition": "<unknown>",
"name": "<string>"
}
],
"entrypoint": [
"<string>"
],
"env": {},
"env_from": [
{
"env_var": "<string>",
"field_ref": "id"
}
],
"exec": [
"<string>"
],
"files": [
{
"guest_path": "<string>",
"image_config": "<string>",
"mode": 123,
"raw_value": "<string>",
"secret_name": "<string>"
}
],
"healthchecks": [
{
"exec": {
"command": [
"<string>"
]
},
"failure_threshold": 123,
"grace_period": 123,
"http": {
"headers": [
{
"name": "<string>",
"values": [
"<string>"
]
}
],
"method": "<string>",
"path": "<string>",
"port": 123,
"scheme": "<unknown>",
"tls_server_name": "<string>",
"tls_skip_verify": true
},
"interval": 123,
"kind": "<unknown>",
"name": "<string>",
"success_threshold": 123,
"tcp": {
"port": 123
},
"timeout": 123,
"unhealthy": "<unknown>"
}
],
"image": "<string>",
"name": "<string>",
"restart": {
"max_retries": 123,
"policy": "no"
},
"secrets": [
{
"env_var": "<string>",
"name": "<string>"
}
],
"stop": {
"signal": "SIGHUP",
"timeout": "10s"
},
"user": "<string>"
}
],
"disable_machine_autostart": true,
"dns": {
"dns_forward_rules": [
{
"addr": "<string>",
"basename": "<string>"
}
],
"hostname": "<string>",
"hostname_fqdn": "<string>",
"nameservers": [
"<string>"
],
"options": [
{
"name": "<string>",
"value": "<string>"
}
],
"searches": [
"<string>"
],
"skip_registration": true
},
"env": {},
"files": [
{
"guest_path": "<string>",
"image_config": "<string>",
"mode": 123,
"raw_value": "<string>",
"secret_name": "<string>"
}
],
"guest": {
"cpu_kind": "<string>",
"cpus": 123,
"gpu_kind": "<string>",
"gpus": 123,
"host_dedication_id": "<string>",
"kernel_args": [
"<string>"
],
"max_memory_mb": 123,
"memory_mb": 123,
"persist_rootfs": "never",
"required_host_features": [
"<string>"
]
},
"image": "<string>",
"init": {
"cmd": [
"<string>"
],
"entrypoint": [
"<string>"
],
"exec": [
"<string>"
],
"kernel_args": [
"<string>"
],
"swap_size_mb": 123,
"tty": true
},
"metadata": {},
"metrics": {
"https": true,
"path": "<string>",
"port": 123
},
"mounts": [
{
"add_size_gb": 123,
"add_size_percent": 123,
"encrypted": true,
"extend_threshold_percent": 123,
"min_add_size_gb": 123,
"name": "<string>",
"path": "<string>",
"size_gb": 123,
"size_gb_limit": 123,
"volume": "<string>"
}
],
"processes": [
{
"cmd": [
"<string>"
],
"entrypoint": [
"<string>"
],
"env": {},
"env_from": [
{
"env_var": "<string>",
"field_ref": "id"
}
],
"exec": [
"<string>"
],
"ignore_app_secrets": true,
"secrets": [
{
"env_var": "<string>",
"name": "<string>"
}
],
"user": "<string>"
}
],
"restart": {
"max_retries": 123,
"policy": "no"
},
"rootfs": {
"persist": "never",
"size_gb": 123
},
"schedule": "<string>",
"services": [
{
"autostart": true,
"autostop": "off",
"checks": [
{
"grace_period": "1s",
"headers": [
{
"name": "<string>",
"values": [
"<string>"
]
}
],
"interval": "15s",
"method": "<string>",
"path": "<string>",
"port": 123,
"protocol": "<string>",
"timeout": "2s",
"tls_server_name": "<string>",
"tls_skip_verify": true,
"type": "<string>"
}
],
"concurrency": {
"hard_limit": 123,
"soft_limit": 123,
"type": "<string>"
},
"force_instance_description": "<string>",
"force_instance_key": "<string>",
"internal_port": 123,
"min_machines_running": 123,
"ports": [
{
"end_port": 123,
"force_https": true,
"handlers": [
"<string>"
],
"http_options": {
"compress": true,
"h2_backend": true,
"headers_read_timeout": 123,
"idle_timeout": 123,
"replay_cache": [
{
"allow_bypass": true,
"name": "<string>",
"path_prefix": "<string>",
"ttl_seconds": 123,
"type": "cookie"
}
],
"response": {
"headers": {},
"pristine": true
}
},
"port": 123,
"proxy_proto_options": {
"fly_src": true,
"version": "<string>"
},
"start_port": 123,
"tls_options": {
"alpn": [
"<string>"
],
"default_self_signed": true,
"versions": [
"<string>"
]
}
}
],
"protocol": "<string>"
}
],
"size": "<string>",
"spot": {
"max_price_fraction": 123
},
"standbys": [
"<string>"
],
"statics": [
{
"guest_path": "<string>",
"url_prefix": "<string>",
"index_document": "<string>",
"tigris_bucket": "<string>"
}
],
"stop_config": {
"signal": "SIGHUP",
"timeout": "10s"
}
},
"version": "<string>"
}
]