Fly.io
Volumes

Create Volume

View as Markdown

Create a volume for a specific app using the details provided in the request body.

POST
/apps/{app_name}/volumes

Create a volume for a specific app using the details provided in the request body.

Authorization

bearerAuth
AuthorizationBearer <token>

A Fly.io access token. Create one with fly tokens create.

In: header

Path Parameters

app_name*string

Fly App Name

Request Body

application/json

Request body

auto_backup_enabled?boolean

enable scheduled automatic snapshots. Defaults to true

compute?
compute_image?string
encrypted?boolean
fstype?string
name?string
region?string
require_unique_zone?boolean
size_gb?integer
snapshot_id?string

restore from snapshot

snapshot_retention?integer
source_volume_id?string

fork from remote volume

unique_zone_app_wide?boolean

Response Body

application/json

curl -X POST "https://example.com/apps/string/volumes" \  -H "Content-Type: application/json" \  -d '{}'
{  "attached_alloc_id": "string",  "attached_machine_id": "string",  "auto_backup_enabled": true,  "block_size": 0,  "blocks": 0,  "blocks_avail": 0,  "blocks_free": 0,  "bytes_total": 0,  "bytes_used": 0,  "created_at": "string",  "encrypted": true,  "fstype": "string",  "host_status": "ok",  "id": "string",  "name": "string",  "region": "string",  "size_gb": 0,  "snapshot_retention": 0,  "state": "string",  "type": "local",  "zone": "string"}