Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
List all snapshots for a specific volume within an app.
cURL
curl --request GET \ --url https://api.machines.dev/v1/apps/{app_name}/volumes/{volume_id}/snapshots \ --header 'Authorization: Bearer <token>'
import requests url = "https://api.machines.dev/v1/apps/{app_name}/volumes/{volume_id}/snapshots" 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}/volumes/{volume_id}/snapshots', 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}/volumes/{volume_id}/snapshots", 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}/volumes/{volume_id}/snapshots" 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}/volumes/{volume_id}/snapshots") .header("Authorization", "Bearer <token>") .asString();
require 'uri' require 'net/http' url = URI("https://api.machines.dev/v1/apps/{app_name}/volumes/{volume_id}/snapshots") 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
[ { "created_at": "<string>", "digest": "<string>", "id": "<string>", "retention_days": 123, "size": 123, "status": "<string>", "volume_size": 123 } ]
A Fly API token with access to the requested organization or resource. Send it as Authorization: Bearer <Fly API token>.
Authorization: Bearer <Fly API token>
Fly App Name
Volume ID
OK
When the snapshot finished, in RFC 3339 format. The zero time (0001-01-01T00:00:00Z) while the snapshot is in progress.
Content digest of the snapshot. Empty while the snapshot is in progress.
Unique ID of the snapshot. Pass it as snapshot_id when creating a volume to restore it.
snapshot_id
Number of days the snapshot is kept after it was created. Omitted while the snapshot is in progress.
Size of the stored snapshot, in bytes. 0 while the snapshot is in progress.
created for completed snapshots; other values while the snapshot is in progress.
created
Size of the volume the snapshot was taken of, in bytes.