Create a Fly App
POST /apps
Machines must be associated with a Fly App. App names must be unique.
Body parameters
string
required
Name of the app to create
boolean
Used for Fly Kubernetes.
string
required
Slug of the org in which to create the app
string
Name for an IPv6 private network to segment the app onto.
POST/v1/apps
Status: 201 created - Example response
network argument in the JSON body, for example: "network": "some-arbitrary-name". Any Machine started in such an app will not be able to access other apps within their organization over the private network. However, Machines within such an app can communicate to each other, and the fly-replay header can still be used to route requests to Machines within a segmented app.
Allocate an IP address for global request routing
If you intend for Machines to be accessible to the internet, you’ll need to allocate an IP address to the app. Currently this is done usingflyctl or the Fly.io GraphQL API. This offers your app automatic, global routing via Anycast. Read more about this in the Networking section.
Example:
my-app-name.fly.dev.
Get app details
GET /apps/{app_name}
Get details about an app, like its organization slug and name. Also, to check if the app exists!
Path parameters
string
required
The name of the Fly App to get the details of.
GET/v1/apps/{app_name}"
Status: 200 OK - Example response
Set app secrets
For sensitive environment variables, such as credentials, you can set secrets on the app:Delete a Fly App
DELETE /apps/{app_name}
Machines should be stopped before attempting deletion. Append ?force=true to the URI to stop and delete immediately.
Path parameters
string
required
The name of the Fly App to delete.
Query parameters
Boolean
Stop all Machines and delete the app immediately.
DELETE/v1/apps/{app_name}
Status: 202 accepted
List apps in an organization
GET /apps?org_slug=
Query parameters
string
required
The organization to list apps for.
GET/v1/apps?org_slug=
Status: 200 OK - Example response
Related topics
- Working with the Machines API
- Machines resource reference
- Tokens resource reference
- Volumes resource reference