{
  "opencollection": "1.0.0",
  "info": {
    "name": "Fly.io Extensions Apps Machines API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Machines",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List machines in an app",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              }
            ]
          },
          "docs": "Returns a list of all Fly Machines belonging to the specified app, including their current state, region, configuration, and private IP addresses."
        },
        {
          "info": {
            "name": "Create a Fly Machine",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates and optionally starts a new Fly Machine within the specified app. The only required configuration field is the container image path. Additional configuration controls compute resources, networking, environment variables, health checks, mounts, and restart policies. Machines are private by default; expose them publicly by allocating an IP address and configuring services with port handlers."
        },
        {
          "info": {
            "name": "Get a Fly Machine",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              }
            ]
          },
          "docs": "Retrieves the current state and full configuration of a specific Fly Machine by its ID, including its instance ID, private IP, region, and applied configuration object."
        },
        {
          "info": {
            "name": "Update a Fly Machine",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the configuration of an existing Fly Machine. The Machine is updated in place and a new instance_id is assigned upon successful update. The same configuration schema used for creation applies here."
        },
        {
          "info": {
            "name": "Delete a Fly Machine",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              }
            ]
          },
          "docs": "Permanently destroys a Fly Machine. The Machine must be in a stopped or suspended state before it can be deleted. Once deleted, the Machine and its ephemeral disk are gone; only attached volumes persist."
        },
        {
          "info": {
            "name": "Start a Fly Machine",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id/start",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              }
            ]
          },
          "docs": "Starts a stopped or suspended Fly Machine. The Machine boots from its current configuration and transitions to the started state. This endpoint returns immediately; use the wait endpoint to block until the Machine reaches the started state."
        },
        {
          "info": {
            "name": "Stop a Fly Machine",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id/stop",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Stops a running Fly Machine by sending a signal to its init process. The Machine transitions to the stopped state. By default, SIGINT is sent; use the signal and timeout fields to customize graceful shutdown behavior."
        },
        {
          "info": {
            "name": "Suspend a Fly Machine",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id/suspend",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              }
            ]
          },
          "docs": "Suspends a running Fly Machine by taking a memory snapshot and halting execution. Suspended Machines can be resumed quickly because they restore from the snapshot rather than booting from scratch. This enables very fast wake times for workloads that are idle."
        },
        {
          "info": {
            "name": "Wait for a Machine to reach a state",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id/wait",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              },
              {
                "name": "state",
                "value": "",
                "type": "query",
                "description": "The target Machine state to wait for. Valid values are started, stopped, suspended, and destroyed."
              },
              {
                "name": "timeout",
                "value": "",
                "type": "query",
                "description": "Maximum number of seconds to wait for the state transition. Defaults to 60 seconds."
              },
              {
                "name": "instance_id",
                "value": "",
                "type": "query",
                "description": "Wait for a specific Machine instance version to reach the target state. Use the instance_id from a Machine update response to confirm that particular deployment is live."
              }
            ]
          },
          "docs": "Blocks until the specified Fly Machine reaches the desired state, or until the timeout elapses. Use this endpoint after starting, stopping, or suspending a Machine to confirm the state transition has completed before proceeding."
        },
        {
          "info": {
            "name": "Cordon a Fly Machine",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id/cordon",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              }
            ]
          },
          "docs": "Marks a Fly Machine as cordoned, which removes it from load balancer rotation so it stops receiving new traffic. Existing connections are not interrupted. Use this endpoint for blue-green deployments or when draining a Machine before maintenance."
        },
        {
          "info": {
            "name": "Uncordon a Fly Machine",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id/uncordon",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              }
            ]
          },
          "docs": "Restores a cordoned Fly Machine to the load balancer rotation, allowing it to receive new traffic again. Use this endpoint after maintenance or to complete a blue-green deployment cutover."
        },
        {
          "info": {
            "name": "Get a Machine metadata value",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id/metadata/:key",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              },
              {
                "name": "key",
                "value": "",
                "type": "path",
                "description": "The metadata key to get, set, or delete."
              }
            ]
          },
          "docs": "Retrieves the value of a specific metadata key from a Fly Machine. Machine metadata consists of arbitrary key-value string pairs that can be used for internal routing, cluster membership, or application configuration."
        },
        {
          "info": {
            "name": "Set a Machine metadata value",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id/metadata/:key",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              },
              {
                "name": "key",
                "value": "",
                "type": "path",
                "description": "The metadata key to get, set, or delete."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates or updates a metadata key-value pair on a Fly Machine. Metadata can be used for service discovery, internal routing with fly-prefer-region headers, and cluster configuration."
        },
        {
          "info": {
            "name": "Delete a Machine metadata value",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{provider_base_url}/v1/apps/:app_name/machines/:machine_id/metadata/:key",
            "params": [
              {
                "name": "app_name",
                "value": "",
                "type": "path",
                "description": "The name of the Fly App."
              },
              {
                "name": "machine_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Fly Machine."
              },
              {
                "name": "key",
                "value": "",
                "type": "path",
                "description": "The metadata key to get, set, or delete."
              }
            ]
          },
          "docs": "Removes a specific metadata key-value pair from a Fly Machine. Once deleted, the key no longer appears in the Machine's metadata and cannot be used for routing or configuration until it is re-added."
        }
      ]
    }
  ],
  "bundled": true
}