Machines

Delete a specific Machine within an app by Machine ID.

Only a Machine in the stopped, suspended, failed, pending or archived state can be deleted. Deleting a Machine in any other state, such as started, fails with 412 Precondition Failed unless you set force=true, which kills the Machine first. Deleting a Machine that is already destroying or destroyed succeeds without doing anything.

If someone else holds a lease on the Machine, the request fails with 409 Conflict. Pass the lease nonce in the fly-machine-lease-nonce header to delete a Machine you hold the lease on.

delete/v1/apps/{app_name}/machines/{machine_id}

Request

  • Base URL
    https://api.machines.dev
  • URL
    https://api.machines.dev/v1/apps/{app_name}/machines/{machine_id}
  • Auth
    HTTP bearer

Path parameters

app_namestring required

Fly App Name

machine_idstring required

Machine ID

Query parameters

forceboolean

Kill the Machine first if it's not stopped, suspended, failed, pending or archived

Response

OK

okboolean

Changes

    • info

      added the media type application/json for the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      endpoint added