Endpoints
Volume properties
List all the volumes in an app
GET /apps/{app_name}/volumes
Given the name of a Fly App, get a list of all the volumes that belong to it.
Path parameters
GET/v1/apps/{app_name}/volumes
Status: 200 OK - Example response
Create a volume
POST /apps/{app_name}/volumes
Create a volume for a specific app according to the configuration provided in the request body.
Path parameters
POST/v1/apps/{app_name}/volumes
Request body schema
Body parameters
An optional object defining the compute specifications for the expected Machine size and type that the volume will attach to. Used to place the volume on hardware that can host that Machine.
The region where the volume will be created. Defaults to the Machine’s region if attached. If not attached, defaults to the app’s primary region.
If true, we will provision this volume on hardware that doesn’t have another volume with the same name on it. The typical pattern is to create as many volumes as you need, all with the same name and
require_unique_zone: true. This will keep your app available in case a host goes down. This flag can also cause volume creation to fail, in case we have used up all unique zones, in which case you probably want to set it to false. Default true.Status: 200 OK - Example response
Get a specific volume
GET /apps/{app_name}/volumes/{volume_id}
Retrieve details about a specific volume by its ID within an app.
Path parameters
GET/v1/apps/{app_name}/volumes/{volume_id}
Status: 200 OK - Example response
Update a volume
PUT /apps/{app_name}/volumes/{volume_id}
Update parameters on the volume.
Path parameters
Body parameters
PUT/v1/apps/{app_name}/volumes/{volume_id}
Status: 200 OK - Example response
Delete a volume permanently
DELETE /apps/{app_name}/volumes/{volume_id}
Delete a volume. This action cannot be undone.
Given the name of a Fly App and the volume ID of a Fly volume, delete the volume.
Path parameters
DELETE/v1/apps/{app_name}/volumes/{volume_id}
Status: 200 OK - Example response
Extend a volume
PUT /apps/{app_name}/volumes/{volume_id}/extend
Given the name of a Fly App and a volume ID, you can make a volume bigger by extending it. You can extend (increase) a volume’s size, but you can’t make a volume smaller.
Path parameters
Body parameters
PUT/v1/apps/{app_name}/volumes/{volume_id}/extend
Status: 200 OK - Example response
needs_restart is true, then your Machine needs to be restarted to make use of the added space.
Get a list of snapshots for a volume
GET /apps/{app_name}/volumes/{volume_id}/snapshots
Given the name of a Fly app and a volume ID, list the available snapshots for that volume.
Path parameters
GET/v1/apps/{app_name}/volumes/{volume_id}/snapshots
Status: 200 OK - Example response
Create a volume from a snapshot
POST /apps/{app_name}/volumes
Create a new volume from a snapshot backup.
Path parameters
Body parameters
The target region. Must be in the same region as the Machine you want to attach it to.
POST/v1/apps/{app_name}/volumes
Status: 200 OK - Example response
“created”.
Create an on-demand volume snapshot (beta)
POST /apps/{app_name}/volumes/{volume_id}/snapshots
Create an on-demand volume snapshot.
Path parameters
POST/v1/apps/{app_name}/volumes/{volume_id}/snapshots
Status: 200 OK - Example response
Related topics
- Working with the Machines API
- Apps resource reference
- Machines resource reference
- Tokens resource reference