> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Events

> List all events associated with a specific Machine within an app.




## OpenAPI

````yaml /api/machines/openapi.json get /v1/apps/{app_name}/machines/{machine_id}/events
openapi: 3.1.0
info:
  title: Machines API
  description: >-
    This site hosts documentation generated from the Fly.io Machines API OpenAPI
    specification. Visit our complete [Machines API
    docs](https://fly.io/docs/machines/api/) for how to get started, more
    information about each endpoint, parameter descriptions, and examples.
  contact: {}
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://api.machines.dev
security:
  - FlyBearerAuth: []
tags:
  - name: Apps
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/apps-resource/) for details about
      using the Apps resource.
  - name: Machines
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/machines-resource/) for details
      about using the Machines resource.
  - name: TLS Certificates
    description: >
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/certificates-resource/) for details
      about using the TLS Certificates resource.
  - name: Volumes
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/volumes-resource/) for details
      about using the Volumes resource.
  - name: Postgres Clusters
    description: >-
      Create and manage Postgres clusters, including databases, users,
      extensions, backups, and app attachments.
externalDocs:
  url: https://fly.io/docs/machines/working-with-machines/
paths:
  /v1/apps/{app_name}/machines/{machine_id}/events:
    get:
      tags:
        - Machines
      summary: List Events
      description: |
        List all events associated with a specific Machine within an app.
      operationId: Machines_list_events
      parameters:
        - name: app_name
          in: path
          description: Fly App Name
          required: true
          schema:
            type: string
        - name: machine_id
          in: path
          description: Machine ID
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: >-
            The number of events to fetch (max of 50). If omitted, this is set
            to 20 by default.
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MachineEvent'
components:
  schemas:
    MachineEvent:
      type: object
      properties:
        id:
          type: string
          description: Unique ID of the event (a ULID).
        request:
          type: object
          description: >-
            Details that depend on the event type. For example, `exit` events
            carry the exit

            code and whether the process was killed for running out of memory,
            and `update`

            events carry the new version.
        source:
          type: string
          description: >-
            Who triggered the event: `user` for requests to this API, `flyd` for
            the host's

            Machine manager acting on its own (for example when a Machine exits
            or restarts), or

            `proxy` for Fly Proxy starting and stopping Machines.
        status:
          type: string
          description: >-
            The state the Machine moved to with this event, such as `created`,
            `started`, or

            `stopped`. The Machine's `state` is the status of its latest event.
        timestamp:
          type: integer
          description: When the event happened, in Unix milliseconds.
        type:
          type: string
          description: >-
            What happened, such as `launch`, `start`, `stop`, `exit`, `restart`,
            `update`,

            `suspension`, `cancel_suspension`, `migration`, `metadata_update`,
            `archive`, or

            `destroy`.
  securitySchemes:
    FlyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Fly API token with access to the requested organization or resource.
        Send it as `Authorization: Bearer <Fly API token>`.

````