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

# Get project-wide server logs

> Retrieves aggregated runtime logs from all servers in the project. Each log entry includes the server name, making it easy to filter and search across your entire fleet.

Use `start_time` and optionally `end_time` to define the time range. Returns the **most recent** entries within that window (up to `limit`), ordered oldest-to-newest.

Narrow results server-side with `search` (case-insensitive substring) and/or `level` (error/warn/info) — both apply across the ENTIRE window, not just the returned page, so you can find a specific error or session ID anywhere in the range. Set `include_counts=true` to also get per-level totals for the window.

**Paging back:** if the window holds more than `limit` entries, pass the response's `older_token` as `end_time` (keeping the same `start_time`) to fetch the next older page. **Live tail:** poll with `next_token` as the next `start_time`; it points just after the newest entry returned, so each poll fetches only newer logs.



## OpenAPI

````yaml https://api.computeflow.cloud/api/doc get /api/v3/projects/logs
openapi: 3.1.0
info:
  title: PlayFlow API
  version: 3.0.0
  description: >
    PlayFlow is a game server hosting and orchestration platform. Deploy,
    manage, and scale multiplayer game servers globally with built-in
    matchmaking, lobby management, and billing.


    ## Authentication


    All API endpoints (except Health) require the `api-key` header:


    ```

    api-key: pf_your_project_api_key

    ```


    Find your API key in the PlayFlow dashboard under **Project Settings**. Each
    project has two keys, both sent in the `api-key` header:


    - **Server key** (`pf_...`) — full access. Keep it secret (server-side
    only).

    - **Client key** (`pfclient_...`) — safe to embed in shipped game clients.
    It has access to all player-facing lobby, matchmaking, and read endpoints,
    but is **rejected with `403`** from admin/privileged routes: admin lobby
    get/force-delete (`GET`/`DELETE /v3/lobbies/{config}/{id}`), build deletion
    (`DELETE /v3/builds/{id}`), and project settings (`POST
    /v3/projects/settings`). Server lifecycle mutations
    (start/stop/restart/update) are allowed for client keys by default but can
    be locked to server-key-only per project via the `client_key_server_control`
    setting.


    ## Quick Start


    1. **Upload a build**: `POST /v3/builds/upload-url` → get presigned URL →
    `PUT` your ZIP → processing starts automatically

    2. **Start a server**: `POST /v3/servers/start` → get connection info in
    `network_ports`

    3. **Connect your game client**: Use `host:external_port` from the response


    ## Key Concepts


    - **Builds**: Your game server binary packaged as a ZIP or Docker image.
    Versioned per name per project.

    - **Servers**: Running game server instances. Each gets dedicated compute
    and network ports with automatic health monitoring.

    - **Pool Servers**: Pre-provisioned servers for instant startup (~5s vs ~30s
    cold start).

    - **Regions**: 13 global regions (us-east, us-south, us-west, eu-north,
    eu-west, eu-uk, ap-south, sea, ap-north, ap-southeast, south-africa,
    south-america-brazil, south-america-chile).

    - **Compute Sizes**: From micro (512MB) to dedicated-xlarge (16GB dedicated
    CPU).


    ## Server Lifecycle


    `launching` → `running` (game ports open) → `stopped` (game exits, TTL
    expires, or manual stop)


    ## Build Lifecycle


    `uploading` → `processing` (build pipeline creates deployable image) →
    `ready` | `failed`


    ## Rate Limits


    - General reads: 100 req/sec per API key

    - Write operations (start server, upload build): 10 req/sec per API key

    - Player-facing lobby writes (join, matchmaking, start): 10 req/sec **per
    player** (keyed by `x-player-id`), so a game's whole player base doesn't
    share one bucket

    - Headers: `X-RateLimit-Limit`, `X-RateLimit-Remaining`


    ## Plan Limits


    - **Free**: 1 server max, forced 1hr TTL, small size only

    - **Pro**: Unlimited servers, all sizes, custom TTL, pool servers


    ## Error Format


    All errors return: `{ "error": "message", "detail": "context", "status": 404
    }`
servers:
  - url: https://api.computeflow.cloud
security:
  - ApiKeyAuth: []
tags:
  - name: Servers
    description: >-
      Create, manage, and monitor game server instances. Each server gets
      dedicated compute, network ports, and automatic health monitoring with TTL
      enforcement. Servers start in `launching` status and transition to
      `running` when the game opens its ports.
  - name: Builds
    description: >-
      Upload and manage game server builds. Supports ZIP uploads (automatically
      processed into deployable images) and direct Docker image references.
      Builds are versioned per name per project — uploading a new build with the
      same name auto-increments the version. Servers always use the latest
      `ready` build unless a specific version is pinned.
  - name: Projects
    description: >-
      Configure project-level settings including network ports, player
      authentication, environment variables, server pooling, and
      lobby/matchmaking rules. Settings apply as defaults to all servers in the
      project and can be overridden per-server at start time.
  - name: Lobbies
    description: >-
      Player-centric lobby and matchmaking system. Every request identifies the
      player via the `x-player-id` header. Use `/me` endpoints to interact with
      your current lobby — the API resolves which lobby you're in automatically.


      **Quick start:** `POST /v3/lobbies/default` creates a lobby with sensible
      defaults (no dashboard config needed). Share the invite `code` with
      friends, or use `POST /v3/lobbies/default/me/matchmaking` to find
      opponents automatically.


      **Matchmaking** supports symmetric teams (2v2, 5v5), asymmetric roles (1
      monster vs 5 hunters), FFA, battle royale duos, and skill-based matching
      with auto-expanding MMR buckets.
paths:
  /api/v3/projects/logs:
    get:
      tags:
        - Projects
      summary: Get project-wide server logs
      description: >-
        Retrieves aggregated runtime logs from all servers in the project. Each
        log entry includes the server name, making it easy to filter and search
        across your entire fleet.


        Use `start_time` and optionally `end_time` to define the time range.
        Returns the **most recent** entries within that window (up to `limit`),
        ordered oldest-to-newest.


        Narrow results server-side with `search` (case-insensitive substring)
        and/or `level` (error/warn/info) — both apply across the ENTIRE window,
        not just the returned page, so you can find a specific error or session
        ID anywhere in the range. Set `include_counts=true` to also get
        per-level totals for the window.


        **Paging back:** if the window holds more than `limit` entries, pass the
        response's `older_token` as `end_time` (keeping the same `start_time`)
        to fetch the next older page. **Live tail:** poll with `next_token` as
        the next `start_time`; it points just after the newest entry returned,
        so each poll fetches only newer logs.
      operationId: getProjectLogs
      parameters:
        - schema:
            type: string
            description: >-
              Window start. Accepts ISO 8601 format (e.g.,
              "2026-03-15T12:00:00Z") or relative time (e.g., "-1h"). Omit to
              use the default 1-hour window (symmetric with the per-server log
              query).
          required: false
          description: >-
            Window start. Accepts ISO 8601 format (e.g., "2026-03-15T12:00:00Z")
            or relative time (e.g., "-1h"). Omit to use the default 1-hour
            window (symmetric with the per-server log query).
          name: start_time
          in: query
        - schema:
            type: string
            description: >-
              Window end. Same format as start_time. Defaults to current time if
              omitted. Pass the response's older_token here to page backward
              through the window.
          required: false
          description: >-
            Window end. Same format as start_time. Defaults to current time if
            omitted. Pass the response's older_token here to page backward
            through the window.
          name: end_time
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 1000
            description: >-
              Maximum number of log entries to return (1–1000). Defaults to
              1000.
          required: false
          description: Maximum number of log entries to return (1–1000). Defaults to 1000.
          name: limit
          in: query
        - schema:
            type: string
            maxLength: 256
            description: >-
              Case-insensitive substring to match within log messages. Applied
              server-side across the ENTIRE window, not just the returned page.
          required: false
          description: >-
            Case-insensitive substring to match within log messages. Applied
            server-side across the ENTIRE window, not just the returned page.
          name: search
          in: query
        - schema:
            type: string
            enum:
              - error
              - warn
              - info
            description: >-
              Restrict to a single inferred severity. Levels are inferred from
              message content (Fly forwards raw stdout without parsed levels).
          required: false
          description: >-
            Restrict to a single inferred severity. Levels are inferred from
            message content (Fly forwards raw stdout without parsed levels).
          name: level
          in: query
        - schema:
            type:
              - boolean
              - 'null'
            default: false
            description: >-
              When true, also return per-level totals for the window (an extra
              aggregation query). Counts respect search but ignore the level
              filter.
          required: false
          description: >-
            When true, also return per-level totals for the window (an extra
            aggregation query). Counts respect search but ignore the level
            filter.
          name: include_counts
          in: query
      responses:
        '200':
          description: >-
            Aggregated logs from all servers in the project with pagination
            cursor.
          content:
            application/json:
              schema:
                type: object
                properties:
                  logs:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          type: string
                          description: ISO 8601 timestamp of the log entry.
                        message:
                          type: string
                          description: >-
                            Log message content from the game server's
                            stdout/stderr.
                        level:
                          type: string
                          description: 'Log severity: "info", "warn", or "error".'
                        instance:
                          type: string
                          description: Fly.io machine ID that produced this log entry.
                        region:
                          type: string
                          description: >-
                            Fly.io region code where the server is running
                            (e.g., "ewr", "fra").
                        server_name:
                          type: string
                          description: >-
                            Display name of the server that produced this log
                            entry.
                      required:
                        - timestamp
                        - message
                        - level
                        - instance
                        - region
                        - server_name
                      description: >-
                        A runtime log entry enriched with the server name for
                        project-wide log views.
                    description: >-
                      The most recent log entries from all servers in the
                      project within the requested window (after any
                      search/level filter), ordered oldest-to-newest.
                  next_token:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Live-tail cursor pointing just after the newest entry
                      returned. Pass as start_time in the next request to fetch
                      only newer logs. Null if no logs were returned.
                  older_token:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Backward cursor equal to the oldest entry returned. Pass
                      as end_time (keeping the same start_time) to page further
                      back through the window. Null if no logs were returned.
                  counts:
                    type:
                      - object
                      - 'null'
                    properties:
                      all:
                        type: integer
                        description: Total matching log entries across all severities.
                      error:
                        type: integer
                        description: Entries inferred as errors.
                      warn:
                        type: integer
                        description: Entries inferred as warnings.
                      info:
                        type: integer
                        description: Entries inferred as info.
                    required:
                      - all
                      - error
                      - warn
                      - info
                    description: >-
                      Per-level totals for the window when include_counts was
                      set; otherwise null.
                required:
                  - logs
                  - next_token
                  - older_token
                  - counts
                description: Aggregated runtime logs from all servers in the project.
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key

````