openapi: 3.1.0
info:
  title: Flare API
  description: >-
    Using our easy-to-use REST API you can administer projects, errors, and
    performance monitoring data.


    ## Authentication


    Authenticate with a personal access token. Every request should include
    an `Accept: application/json` header.


    ### Personal access tokens


    Create one under [Account → API access](/account/api-access),
    scoped to the teams and projects you choose and to one or more of the
    `read`, `write`, and `admin` scopes. Send it as a Bearer header.


    ```shellscript

    curl "https://flareapp.io/api/projects" \

    -H 'Authorization: Bearer <token>' \

    -H 'Accept: application/json'

    ```


    ### Legacy API tokens


    Legacy API tokens predate personal access tokens. They grant full access
    to every team and project the issuing user belongs to and cannot be
    scoped further. New integrations should use a personal access token
    instead. Legacy tokens accept either a Bearer header or an `api_token`
    query parameter.


    ```shellscript

    curl "https://flareapp.io/api/projects?api_token=<token>" \

    -H 'Accept: application/json'

    ```


    ## Scopes


    Personal access tokens carry one or more scopes that control which
    endpoints they can call. Requests made with a token that is missing the
    required scope return `403`.


    | Scope   | What it grants                                                            |

    | ------- | ------------------------------------------------------------------------- |

    | `read`  | Read errors, logs, traces, projects, and team data.                       |

    | `write` | Resolve, snooze, comment, upload sourcemaps, change settings.             |

    | `admin` | Manage team membership, billing, projects, and API keys.                  |


    Each operation in this reference declares the scope it requires under
    its security section. Legacy API tokens bypass scope checks.


    ## Pagination


    Most paginated endpoints follow the JSON:API pagination specification.


    #### Query Parameters

    - `page[number]` - The page number (default: 1, minimum: 1)

    - `page[size]` - Number of items per page (default: 10, minimum: 1, maximum:
    30)


    #### Response Structure

    All paginated responses include:

    - `data` - Array of items for the current page

    - `meta` - Pagination metadata including current_page, total, per_page, from,
    to, last_page

    - `links` - Navigation links for first, last, previous, and next pages


    #### Example

    ```shellscript

    curl "https://flareapp.io/api/projects?page[number]=2&page[size]=15" \

    -H 'Authorization: Bearer xyz123' \

    -H 'Accept: application/json'

    ```


    #### Cursor Pagination (Logs)


    The logs endpoint uses cursor-based pagination instead of page numbers.
    Use `cursor[timestamp]` and `cursor[uuid]` from a previous response
    together with `cursor[direction]=before` (older than the cursor) or
    `cursor[direction]=after` (newer than the cursor) to fetch additional
    pages. The `order` parameter (`asc` or `desc`, default `desc`)
    controls the order of rows in the response and is independent of the
    cursor direction. Use `page[size]` to control the number of items per
    page (default: 100, max: 1000). The `meta.has_more` field indicates
    whether more results are available.
  version: 1.0.0
  contact:
    name: Flare
    url: https://flareapp.io
    email: support@flareapp.io
  x-logo:
    url: "https://flareapp.io/android-chrome-512x512.png"
    backgroundColor: "rgb(250, 250, 250)"
    altText: "Flare logo"
servers:
  - url: https://flareapp.io/api
security:
  - OAuth2: [read]
  - BearerAuth: []
  - UserAPIToken: []
webhooks:
  error:
    post:
      tags:
        - webhooks
      summary: An error webhook received by your system
      requestBody:
        description: Happens when an error is resolved, unresolved, snoozed or unsnoozed
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/errorWebhook'
  project:
    post:
      tags:
        - webhooks
      summary: An project webhook received by your system
      requestBody:
        description: Happens when a project spike protection is activated or deactivated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/projectWebhook'
  errorOccurrence:
    post:
      tags:
        - webhooks
      summary: An error occurrence webhook received by your system
      requestBody:
        description: >-
          Happens when a new error occurs, an error reoccurs, a resolved error
          reoccurs or an error occurred many times
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/errorOccurrenceWebhook'
  errorNote:
    post:
      tags:
        - webhooks
      summary: An error note webhook received by your system
      requestBody:
        description: Happens when a new note on an error is created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/errorNoteWebhook'
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      description: >-
        Used by the Flare CLI and other OAuth clients accessing the REST API.
        MCP clients use the separate `/mcp` resource and the `mcp:use`
        protocol scope. Most non-interactive integrations should use a
        personal access token sent as a Bearer header instead.
      flows:
        authorizationCode:
          authorizationUrl: https://flareapp.io/oauth/authorize
          tokenUrl: https://flareapp.io/oauth/token
          refreshUrl: https://flareapp.io/oauth/token
          scopes:
            read: Read errors, logs, traces, projects, and team data
            write: Resolve, snooze, comment, upload sourcemaps, change settings
            admin: Manage team membership, billing, projects, and API keys
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token or legacy API token sent as a Bearer header.
        Personal access tokens honour the scopes they were issued with;
        legacy API tokens bypass scope checks.
    UserAPIToken:
      type: apiKey
      in: query
      name: api_token
      deprecated: true
      description: >-
        Legacy API token sent as a query parameter. Supported for backwards
        compatibility — new integrations should use a personal access token
        sent as a Bearer header instead.
  parameters:
    PageNumber:
      in: query
      name: page[number]
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
      description: The page number to retrieve
    PageSize:
      in: query
      name: page[size]
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 30
        default: 10
      description: Number of items per page (maximum 30)
    FilterP50Eq:
      in: query
      name: filter[p50:eq]
      required: false
      schema:
        type:
          - number
      description: Filter by p50 duration in milliseconds.
    FilterP50Neq:
      in: query
      name: filter[p50:neq]
      required: false
      schema:
        type:
          - number
      description: Filter by p50 duration in milliseconds.
    FilterP50Gt:
      in: query
      name: filter[p50:gt]
      required: false
      schema:
        type:
          - number
      description: Filter by p50 duration in milliseconds.
    FilterP50Gte:
      in: query
      name: filter[p50:gte]
      required: false
      schema:
        type:
          - number
      description: Filter by p50 duration in milliseconds.
    FilterP50Lt:
      in: query
      name: filter[p50:lt]
      required: false
      schema:
        type:
          - number
      description: Filter by p50 duration in milliseconds.
    FilterP50Lte:
      in: query
      name: filter[p50:lte]
      required: false
      schema:
        type:
          - number
      description: Filter by p50 duration in milliseconds.
    FilterP90Eq:
      in: query
      name: filter[p90:eq]
      required: false
      schema:
        type:
          - number
      description: Filter by p90 duration in milliseconds.
    FilterP90Neq:
      in: query
      name: filter[p90:neq]
      required: false
      schema:
        type:
          - number
      description: Filter by p90 duration in milliseconds.
    FilterP90Gt:
      in: query
      name: filter[p90:gt]
      required: false
      schema:
        type:
          - number
      description: Filter by p90 duration in milliseconds.
    FilterP90Gte:
      in: query
      name: filter[p90:gte]
      required: false
      schema:
        type:
          - number
      description: Filter by p90 duration in milliseconds.
    FilterP90Lt:
      in: query
      name: filter[p90:lt]
      required: false
      schema:
        type:
          - number
      description: Filter by p90 duration in milliseconds.
    FilterP90Lte:
      in: query
      name: filter[p90:lte]
      required: false
      schema:
        type:
          - number
      description: Filter by p90 duration in milliseconds.
    FilterP95Eq:
      in: query
      name: filter[p95:eq]
      required: false
      schema:
        type:
          - number
      description: Filter by p95 duration in milliseconds.
    FilterP95Neq:
      in: query
      name: filter[p95:neq]
      required: false
      schema:
        type:
          - number
      description: Filter by p95 duration in milliseconds.
    FilterP95Gt:
      in: query
      name: filter[p95:gt]
      required: false
      schema:
        type:
          - number
      description: Filter by p95 duration in milliseconds.
    FilterP95Gte:
      in: query
      name: filter[p95:gte]
      required: false
      schema:
        type:
          - number
      description: Filter by p95 duration in milliseconds.
    FilterP95Lt:
      in: query
      name: filter[p95:lt]
      required: false
      schema:
        type:
          - number
      description: Filter by p95 duration in milliseconds.
    FilterP95Lte:
      in: query
      name: filter[p95:lte]
      required: false
      schema:
        type:
          - number
      description: Filter by p95 duration in milliseconds.
    FilterP99Eq:
      in: query
      name: filter[p99:eq]
      required: false
      schema:
        type:
          - number
      description: Filter by p99 duration in milliseconds.
    FilterP99Neq:
      in: query
      name: filter[p99:neq]
      required: false
      schema:
        type:
          - number
      description: Filter by p99 duration in milliseconds.
    FilterP99Gt:
      in: query
      name: filter[p99:gt]
      required: false
      schema:
        type:
          - number
      description: Filter by p99 duration in milliseconds.
    FilterP99Gte:
      in: query
      name: filter[p99:gte]
      required: false
      schema:
        type:
          - number
      description: Filter by p99 duration in milliseconds.
    FilterP99Lt:
      in: query
      name: filter[p99:lt]
      required: false
      schema:
        type:
          - number
      description: Filter by p99 duration in milliseconds.
    FilterP99Lte:
      in: query
      name: filter[p99:lte]
      required: false
      schema:
        type:
          - number
      description: Filter by p99 duration in milliseconds.
    FilterAverageEq:
      in: query
      name: filter[average:eq]
      required: false
      schema:
        type:
          - number
      description: Filter by average duration in milliseconds.
    FilterAverageNeq:
      in: query
      name: filter[average:neq]
      required: false
      schema:
        type:
          - number
      description: Filter by average duration in milliseconds.
    FilterAverageGt:
      in: query
      name: filter[average:gt]
      required: false
      schema:
        type:
          - number
      description: Filter by average duration in milliseconds.
    FilterAverageGte:
      in: query
      name: filter[average:gte]
      required: false
      schema:
        type:
          - number
      description: Filter by average duration in milliseconds.
    FilterAverageLt:
      in: query
      name: filter[average:lt]
      required: false
      schema:
        type:
          - number
      description: Filter by average duration in milliseconds.
    FilterAverageLte:
      in: query
      name: filter[average:lte]
      required: false
      schema:
        type:
          - number
      description: Filter by average duration in milliseconds.
    FilterCountEq:
      in: query
      name: filter[count:eq]
      required: false
      schema:
        type:
          - number
      description: Filter by count.
    FilterCountNeq:
      in: query
      name: filter[count:neq]
      required: false
      schema:
        type:
          - number
      description: Filter by count.
    FilterCountGt:
      in: query
      name: filter[count:gt]
      required: false
      schema:
        type:
          - number
      description: Filter by count.
    FilterCountGte:
      in: query
      name: filter[count:gte]
      required: false
      schema:
        type:
          - number
      description: Filter by count.
    FilterCountLt:
      in: query
      name: filter[count:lt]
      required: false
      schema:
        type:
          - number
      description: Filter by count.
    FilterCountLte:
      in: query
      name: filter[count:lte]
      required: false
      schema:
        type:
          - number
      description: Filter by count.
    FilterThroughputEq:
      in: query
      name: filter[throughput:eq]
      required: false
      schema:
        type:
          - number
      description: Filter by throughput.
    FilterThroughputNeq:
      in: query
      name: filter[throughput:neq]
      required: false
      schema:
        type:
          - number
      description: Filter by throughput.
    FilterThroughputGt:
      in: query
      name: filter[throughput:gt]
      required: false
      schema:
        type:
          - number
      description: Filter by throughput.
    FilterThroughputGte:
      in: query
      name: filter[throughput:gte]
      required: false
      schema:
        type:
          - number
      description: Filter by throughput.
    FilterThroughputLt:
      in: query
      name: filter[throughput:lt]
      required: false
      schema:
        type:
          - number
      description: Filter by throughput.
    FilterThroughputLte:
      in: query
      name: filter[throughput:lte]
      required: false
      schema:
        type:
          - number
      description: Filter by throughput.
    FilterErrorRateEq:
      in: query
      name: filter[error_rate:eq]
      required: false
      schema:
        type:
          - number
      description: Filter by error rate.
    FilterErrorRateNeq:
      in: query
      name: filter[error_rate:neq]
      required: false
      schema:
        type:
          - number
      description: Filter by error rate.
    FilterErrorRateGt:
      in: query
      name: filter[error_rate:gt]
      required: false
      schema:
        type:
          - number
      description: Filter by error rate.
    FilterErrorRateGte:
      in: query
      name: filter[error_rate:gte]
      required: false
      schema:
        type:
          - number
      description: Filter by error rate.
    FilterErrorRateLt:
      in: query
      name: filter[error_rate:lt]
      required: false
      schema:
        type:
          - number
      description: Filter by error rate.
    FilterErrorRateLte:
      in: query
      name: filter[error_rate:lte]
      required: false
      schema:
        type:
          - number
      description: Filter by error rate.
  schemas:
    paginatedResult:
      type:
        - object
      properties:
        data:
          type:
            - array
          items:
            type:
              - object
        meta:
          type:
            - object
          properties:
            current_page:
              type:
                - integer
              examples:
                - 1
            first_page_url:
              type:
                - 'null'
                - string
              examples:
                - https://flareapp.io/api/resource?page[number]=1
            from:
              type:
                - integer
              examples:
                - 1
            last_page:
              type:
                - integer
              examples:
                - 1
            last_page_url:
                type:
                    - 'null'
                    - string
                examples:
                    - https://flareapp.io/api/resource?page[number]=3
            next_page_url:
                type:
                    - 'null'
                    - string
                examples:
                    - https://flareapp.io/api/resource?page[number]=2
            path:
                type:
                    - 'null'
                    - string
                examples:
                    - https://flareapp.io/api/resource
            per_page:
                type:
                    - integer
                examples:
                    - 10
            prev_page_url:
                type:
                    - 'null'
                    - string
                examples:
                    - https://flareapp.io/api/resource?page[number]=1
            to:
                type:
                    - integer
                examples:
                    - 1
            total:
                type:
                    - integer
                examples:
                    - 10
        links:
          type:
            - object
          properties:
            url:
              type:
                - 'null'
                - string
              examples:
                - https://flareapp.io/api/resource?page[number]=1
            label:
              type:
                - string
              examples:
                - Next
            active:
              type:
                - boolean
              examples:
                - false
    minimalUser:
      type:
        - object
      properties:
        id:
          type:
            - integer
          description: The user's unique identifier.
          examples:
            - 1
        name:
          type:
            - string
          description: The user's name.
          examples:
            - Freek Van der Herten
        email:
          type:
            - string
          description: The user's email address.
          examples:
            - freek@spatie.be
        github_id:
          type:
            - 'null'
            - string
          description: The user's GitHub ID.
          examples:
            - '12345678'
        google_id:
          type:
            - 'null'
            - string
          description: The user's Google ID.
          examples:
            - '98765432109876543210'
    baseError:
      type:
        - object
      properties:
        id:
          type:
            - integer
          description: The error's unique identifier.
          examples:
            - 1
        slug:
          type:
            - string
          description: The error's slug.
          examples:
            - an-unexpected-error-occurred
        entry_point_value:
          type:
            - string
          description: >-
            The raw entry point value. Full URL for web, command with args for CLI, job class for queue.
          examples:
            - https://hermiston.biz/et-non-cum-animi-et-repudiandae-ut.html
        entry_point:
          type:
            - string
          deprecated: true
          description: >-
            Deprecated. Use entry_point_value instead. Returns the same value as entry_point_value.
          examples:
            - https://hermiston.biz/et-non-cum-animi-et-repudiandae-ut.html
        entry_point_handler_identifier:
          type:
            - string
            - 'null'
          description: >-
            Groupable identifier for the entry point. Route pattern for web, command name for CLI, short job name for queue.
          examples:
            - GET /users/{userId}
        entry_point_handler_name:
          type:
            - string
            - 'null'
          description: >-
            The handler name. Controller, command class, job class, or null.
          examples:
            - App\Http\Controllers\UsersController
        entry_point_handler_type:
          type:
            - string
            - 'null'
          description: >-
            The kind of handler. Framework-prefixed type like laravel_controller, php_closure.
          examples:
            - laravel_controller
        exception_message:
          type:
            - string
          description: The exception message.
          examples:
            - Earum ut laborum error quod cumque dolorem et.
        exception_class:
          type:
            - string
          description: The exception class.
          examples:
            - ErrorException
        exception_code:
          type:
            - 'null'
            - string
          description: The exception code.
          examples:
            - '400'
        file:
          type:
            - string
          description: The file where the error occurred.
          examples:
            - database/faker/ExceptionProvider.php
        line_number:
          type:
            - integer
          description: The line number where the error occurred.
          examples:
            - 123
        class:
          type:
            - string
          description: The class where the error occurred.
          examples:
            - ExceptionProvider
        method:
          type:
            - string
          description: The method where the error occurred.
          examples:
            - createException
        first_seen_at:
          type:
            - string
          description: The date and time when the error was first seen.
          examples:
            - '2021-03-22T10:32:00.000Z'
        last_seen_at:
          type:
            - string
          description: The date and time when the error was last seen.
          examples:
            - '2023-09-25T09:04:25.000Z'
        occurrence_count:
          type:
            - integer
          description: The number of times the error occurred.
          examples:
            - 145
        affected_user_count:
          type:
            - integer
          description: The number of users that were affected by the error.
          examples:
            - 2
        share_count:
          type:
            - integer
          description: The number of times the error was shared.
          examples:
            - 2
        notifier_client_name:
          type:
            - string
          description: The name of the notifier client.
          examples:
            - Laravel Client
        language_version:
          type:
            - string
          description: The version of the language.
          examples:
            - 8.0.0
        framework_version:
          type:
            - string
          description: The version of the framework.
          examples:
            - 10.13.0
        stage:
          type:
            - string
          description: The stage where the error occurred.
          examples:
            - production
        entry_point_type:
          type:
            - string
          enum:
            - web
            - cli
            - queue
          description: The type of the entry point.
          examples:
            - web
        application_version:
          type:
            - string
          description: The version of the application.
          examples:
            - b1c473b
        level:
          type:
            - 'null'
            - string
          enum:
            - debug
            - info
            - notice
            - warning
            - error
            - critical
            - alert
            - emergency
          description: When a message is logged, this will be the level of the message.
          examples:
            - error
        status:
          type:
            - string
          enum:
            - open
            - resolved
          description: The status of the error.
          examples:
            - open
        resolved_by_user_name:
          type:
            - 'null'
            - string
          description: The name of the user that resolved the error.
          examples:
            - Freek Van der Herten
        resolved_by_channel:
          type:
            - 'null'
            - string
          enum:
            - slack
            - telegram
            - github
            - mail
            - flare
            - api
          description: The channel that resolved the error.
          examples:
            - flare
        resolved_by_channel_label:
          type:
            - 'null'
            - string
          enum:
            - Slack
            - Telegram
            - GitHub
            - Mail
            - Flare
            - API
          description: The label of the channel that resolved the error.
          examples:
            - Flare
        resolved_at:
          type:
            - 'null'
            - string
          description: The date and time when the error was resolved.
          examples:
            - '2023-09-25T09:04:25.000Z'
        language:
          type:
            - string
          enum:
            - PHP
            - javascript
          description: The language of the project.
          examples:
            - PHP
        latest_occurrence_has_solutions:
          type:
            - boolean
          description: Indicates if the latest occurrence has solutions.
          examples:
            - true
        snooze_type:
          type:
            - 'null'
            - string
          enum:
            - snooze_until
            - snooze_forever
            - snooze_number_of_occurrences
            - snooze_application_version
          description: The type of the snooze.
          examples:
            - snooze_until
        snoozed_at:
          type:
            - 'null'
            - string
          description: The date and time when the error was snoozed.
          examples:
            - '2023-09-25T09:04:25.000Z'
        snoozed_until:
          type:
            - 'null'
            - string
          description: The date and time until the error is snoozed.
          examples:
            - '2023-09-25T09:04:25.000Z'
        snoozed_up_to_occurrence_number:
          type:
            - 'null'
            - integer
          description: The number of occurrences the error is snoozed.
          examples:
            - 10
        snoozed_by_user_name:
          type:
            - 'null'
            - string
          description: The name of the user that snoozed the error.
          examples:
            - Freek Van der Herten
        snoozed_by_channel:
          type:
            - 'null'
            - string
          enum:
            - slack
            - telegram
            - github
            - mail
            - flare
            - api
          description: The channel that snoozed the error.
          examples:
            - flare
        snoozed_by_channel_label:
          type:
            - 'null'
            - string
          enum:
            - Slack
            - Telegram
            - GitHub
            - Mail
            - Flare
            - API
          description: The label of the channel that snoozed the error.
          examples:
            - Flare
        marked_for_deletion_by_user_name:
          type:
            - 'null'
            - string
          description: The name of the user that marked the error for deletion.
          examples:
            - Freek Van der Herten
        marked_for_deletion_by_channel:
          type:
            - 'null'
            - string
          enum:
            - slack
            - telegram
            - github
            - mail
            - flare
          description: The channel that marked the error for deletion.
          examples:
            - flare
        assignees:
          type:
            - array
          description: The users assigned to the error.
          items:
            $ref: '#/components/schemas/minimalUser'
        framework:
          type:
            - 'null'
            - string
          description: The framework name (e.g., "laravel", "react").
          examples:
            - laravel
        latest_occurrence_url_on_flare:
          type:
            - 'null'
            - string
          description: The URL to view the latest occurrence on Flare.
          examples:
            - https://flareapp.io/teams/1/projects/2/errors/3/occurrences/4
    baseErrorOccurrence:
      type:
        - object
      properties:
        id:
          type:
            - integer
          description: The error occurrence's unique identifier.
          examples:
            - 1
        error_id:
          type:
            - integer
          description: The error's unique identifier.
          examples:
            - 1
        received_at:
          type:
            - string
          description: The date and time when the error occurrence was received.
          examples:
            - '2023-09-25T09:04:25.000Z'
        entry_point_value:
          type:
            - 'null'
            - string
          description: >-
            The raw entry point value. Full URL for web, command with args for CLI, job class for queue.
          examples:
            - https://hermiston.biz/et-non-cum-animi-et-repudiandae-ut.html
        entry_point:
          type:
            - 'null'
            - string
          deprecated: true
          description: >-
            Deprecated. Use entry_point_value instead. Returns the same value as entry_point_value.
          examples:
            - https://hermiston.biz/et-non-cum-animi-et-repudiandae-ut.html
        entry_point_handler_identifier:
          type:
            - 'null'
            - string
          description: >-
            Groupable identifier for the entry point.
          examples:
            - GET /users/{userId}
        entry_point_handler_name:
          type:
            - 'null'
            - string
          description: >-
            The handler name. Controller, command class, job class, or null.
          examples:
            - App\Http\Controllers\UsersController
        entry_point_handler_type:
          type:
            - 'null'
            - string
          description: >-
            The kind of handler.
          examples:
            - laravel_controller
        exception_class:
          type:
            - 'null'
            - string
          description: The exception class.
          examples:
            - ErrorException
        exception_message:
          type:
            - 'null'
            - string
          description: The exception message.
          examples:
            - Earum ut laborum error quod cumque dolorem et.
        exception_code:
          type:
            - 'null'
            - string
          description: The exception code.
          examples:
            - '400'
        application_path:
          type:
            - 'null'
            - string
          description: The path of the application.
          examples:
            - /var/www/html
        application_version:
          type:
            - 'null'
            - string
          description: The version of the application.
          examples:
            - b1c473b
        notifier_client_name:
          type:
            - 'null'
            - string
          description: The name of the notifier client.
          examples:
            - Laravel Client
        language_version:
          type:
            - 'null'
            - string
          description: The version of the language.
          examples:
            - 8.0.0
        framework_version:
          type:
            - 'null'
            - string
          description: The version of the framework.
          examples:
            - 10.13.0
        stage:
          type:
            - 'null'
            - string
          description: The stage where the error occurred.
          examples:
            - production
        entry_point_type:
          type:
            - 'null'
            - string
          enum:
            - web
            - cli
            - queue
          description: The type of the entry point.
          examples:
            - web
    baseProject:
      type:
        - object
      properties:
        id:
          type:
            - integer
          description: The project's unique identifier.
          examples:
            - 1
        name:
          type:
            - string
          description: The project's name.
          examples:
            - Flare
        slug:
          type:
            - string
          description: The project's slug.
          examples:
            - flare
        group_name:
          type:
            - 'null'
            - string
          description: The project's group name.
          examples:
            - Flare
        errors_last_7_days_count:
          type:
            - integer
          description: The number of errors that occurred in the last 7 days.
          examples:
            - 10
        errors_previous_7_days_count:
          type:
            - integer
          description: The number of errors that occurred in the between 7 and 14 days.
          examples:
            - 5
        unresolved_errors_count:
          type:
            - integer
          description: The number of unresolved errors.
          examples:
            - 2
        last_error_received_at:
          type:
            - string
          description: The date and time of the last error that occurred.
          examples:
            - '2023-09-25T09:04:25.000Z'
        spike_protection_active_until:
          type:
            - 'null'
            - string
          description: The date and time until the spike protection is active.
          examples:
            - '2023-09-25T09:04:25.000Z'
        protect_against_spikes:
          type:
            - boolean
          description: Indicates if the project is spike protection is enabled.
          examples:
            - true
        stage:
          type:
            - string
          enum:
            - local
            - development
            - staging
            - production
          description: The project's stage.
          examples:
            - production
        technology:
          type:
            - string
          enum:
            - Laravel
            - PHP
            - JS
            - Vue
            - React
            - Svelte
          description: The project's technology.
          examples:
            - PHP
    baseTeam:
      type:
        - object
      properties:
        id:
          type:
            - integer
          description: The team's unique identifier.
          examples:
            - 1
        name:
          type:
            - string
          description: The team's name.
          examples:
            - Spatie
        slug:
          type:
            - string
          description: The team's slug.
          examples:
            - spatie
    user:
      type:
        - object
      properties:
        id:
          type:
            - integer
          description: The user's unique identifier.
          examples:
            - 1
        name:
          type:
            - string
          description: The user's name.
          examples:
            - Freek
        email:
          type:
            - string
          description: The user's email address.
          examples:
            - freek@spatie.be
        photo_url:
          type:
            - 'null'
            - string
          description: The user's avatar URL.
          examples:
            - >-
              https://www.gravatar.com/avatar/a1b4b398630bbd32b77a82cbc37fae9a.jpg?s=200&d=mm
        teams:
          type:
            - array
          description: The teams the user belongs to.
          examples:
            - - id: 1
                name: Spatie
              - id: 2
                name: Oh Dear
          items:
            $ref: '#/components/schemas/baseTeam'
    team:
      allOf:
        - $ref: '#/components/schemas/baseTeam'
        - type:
            - object
          properties:
            users:
              type:
                - array
              description: The users that belong to the team.
              items:
                $ref: '#/components/schemas/teamUser'
    teamUser:
      type:
        - object
      properties:
        user_id:
          type:
            - integer
          description: The user's unique identifier.
          examples:
            - 1
        team_id:
          type:
            - integer
          description: The team's unique identifier.
          examples:
            - 1
        user_email:
          type:
            - string
          description: The user's email address.
          examples:
            - freek@spatie.be
        role:
          type:
            - string
          enum:
            - admin
            - owner
            - member
          description: The user's role within the team.
          examples:
            - admin
    error:
      allOf:
        - $ref: '#/components/schemas/baseError'
    errorOccurrenceContextItem:
      type:
        - object
      properties:
        group:
          type:
            - string
          description: The group of the context item.
          examples:
            - request
        key:
          type:
            - string
          description: The key of the context item.
          examples:
            - user_agent
        value:
          type:
            - string
          description: The value of the context item.
          examples:
            - >-
              Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
              (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
    errorOccurrenceFrame:
      type:
        - object
      properties:
        file:
          type:
            - string
          description: The file of the frame.
          examples:
            - >-
              /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
        relative_file:
          type:
            - string
          description: The relative file of the frame.
          examples:
            - >-
              vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
        line_number:
          type:
            - integer
          description: The line number of the frame.
          examples:
            - 123
        class:
          type:
            - string
          description: The class of the frame.
          examples:
            - Illuminate\Database\Eloquent\Model
        method:
          type:
            - string
          description: The method of the frame.
          examples:
            - setAttribute
        code_snippet:
          type:
            - array
          description: The code of the frame.
          items:
            type:
              - string
        application_frame:
          type:
            - boolean
          description: Indicates if the frame is an application frame.
          examples:
            - true
    errorOccurrenceEvent:
      type:
        - object
      properties:
        id:
          type:
            - integer
          description: The event's unique identifier.
          examples:
            - 1
        microtime:
          type:
            - integer
          description: The time of the event.
          examples:
            - 1616421120
        received_at:
          type:
            - string
          description: The date and time when the event was received.
          examples:
            - '2023-09-25T09:04:25.000Z'
        name:
          type:
            - string
          description: The name of the event.
          examples:
            - Event name
        level:
          type:
            - string
          description: The message level of the event.
          examples:
            - error
        meta_data:
          type:
            - object
          description: The meta data of the event.
          examples:
            - key: value
    errorOccurrenceSolution:
      type:
        - object
      properties:
        id:
          type:
            - integer
          description: The solution's unique identifier.
          examples:
            - 1
        title:
          type:
            - string
          description: The title of the solution.
          examples:
            - Solution title
        description:
          type:
            - string
          description: The description of the solution.
          examples:
            - Solution description
        links:
          type:
            - array
          description: Links to external resources.
          items:
            type:
              - string
        action_description:
          type:
            - string
          description: The action description of the solution.
          examples:
            - Solution action description
        is_runnable:
          type:
            - boolean
          description: Indicates if the solution is runnable.
          examples:
            - true
    errorOccurrencePreviousException:
      type:
        - object
      properties:
        id:
          type:
            - integer
          description: >-
            The previous exception's unique identifier. Use this id to fetch
            its frames via
            /error-occurrences/{occurrence_id}/previous-exceptions/{previous_exception_id}.
          examples:
            - 42
        order:
          type:
            - integer
          description: >-
            The position of this exception in the chain, starting at 0 for the
            immediate cause of the top exception. Higher orders are deeper
            causes. The top exception itself is not part of this list.
          examples:
            - 0
        exception_class:
          type:
            - string
          description: The class of the previous exception.
          examples:
            - PDOException
        exception_message:
          type:
            - string
          description: The message of the previous exception.
          examples:
            - SQLSTATE[HY000] [2002] Connection refused
        first_frame_file:
          type:
            - string
            - 'null'
          description: The file of the first frame of this previous exception's stack trace.
          examples:
            - app/Http/Controllers/PaymentsController.php
        first_frame_line_number:
          type:
            - integer
            - 'null'
          description: >-
            The line number of the first frame of this previous exception's
            stack trace.
          examples:
            - 58
    errorOccurrence:
      allOf:
        - $ref: '#/components/schemas/baseErrorOccurrence'
        - type:
            - object
          properties:
            attributes:
              type:
                - array
              description: The attributes of the error occurrence.
              items:
                $ref: '#/components/schemas/errorOccurrenceContextItem'
            frames:
              type:
                - array
              description: The frames of the error occurrence.
              items:
                $ref: '#/components/schemas/errorOccurrenceFrame'
            events:
              type:
                - array
              description: The events of the error occurrence.
              items:
                $ref: '#/components/schemas/errorOccurrenceEvent'
            previous_exceptions:
              type:
                - array
              description: >-
                The exception chain for this occurrence, excluding the top
                exception. Ordered from the immediate cause (order 0) to the
                root cause. Contains at most the first three previous
                exceptions.
              items:
                $ref: '#/components/schemas/errorOccurrencePreviousException'
            solutions:
              type:
                - array
              description: The solutions of the error occurrence.
              items:
                $ref: '#/components/schemas/errorOccurrenceSolution'
            has_solutions:
              type:
                - boolean
              description: Indicates if the error occurrence has solutions.
            error:
              $ref: '#/components/schemas/error'
    project:
      allOf:
        - $ref: '#/components/schemas/baseProject'
        - type:
            - object
          properties:
            api_key:
              type:
                - string
              description: The project's API key.
              examples:
                - 1mrPDGjWcmz9ACC2A4zzkzN1zAltKUKl
            api_public_key:
              type:
                - string
              description: >-
                The project's API key which can be used in your frontend
                application.
              examples:
                - DZWbDKHd1quYsIlQUI97fTcRG5cBkEC0
            team:
              $ref: '#/components/schemas/baseTeam'
    errorWebhook:
      type:
        - object
      properties:
        type:
          type:
            - string
          description: The type of the webhook.
          enum:
            - ErrorResolvedNotification
            - ErrorSnoozedNotification
            - ErrorUnresolvedNotification
            - ErrorUnsnoozedNotification
          examples:
            - ErrorResolvedNotification
        error:
          $ref: '#/components/schemas/webhookError'
    projectWebhook:
      type:
        - object
      properties:
        type:
          type:
            - string
          description: The type of the webhook.
          enum:
            - SpikeProtectionActivatedNotification
            - SpikeProtectionDeactivatedNotification
          examples:
            - SpikeProtectionDeactivatedNotification
        project:
          $ref: '#/components/schemas/webhookProject'
    errorOccurrenceWebhook:
      type:
        - object
      properties:
        type:
          type:
            - string
          description: The type of the webhook.
          enum:
            - ErrorOccurredManyTimesNotification
            - ErrorReoccurredNotification
            - NewErrorOccurredNotification
            - ResolvedErrorReoccurredNotification
          examples:
            - ErrorOccurrenceNotification
        errorOccurrence:
          $ref: '#/components/schemas/webhookErrorOccurrence'
    errorNoteWebhook:
      type:
        - object
      properties:
        type:
          type:
            - string
          description: The type of the webhook.
          enum:
            - ErrorNoteCreatedNotification
          examples:
            - ErrorNoteCreatedNotification
        comment:
          type:
            - string
          description: The comment that was added to the error.
        user:
          type:
            - string
          description: The email of the user that added the comment.
        error:
          $ref: '#/components/schemas/webhookError'
    webhookError:
      allOf:
        - $ref: '#/components/schemas/baseError'
        - type:
            - object
          properties:
            project:
              $ref: '#/components/schemas/webhookProject'
    webhookErrorOccurrence:
      allOf:
        - $ref: '#/components/schemas/baseErrorOccurrence'
        - type:
            - object
          properties:
            error:
              $ref: '#/components/schemas/webhookErrorOccurrence'
    webhookTeam:
      $ref: '#/components/schemas/baseTeam'
    webhookProject:
      allOf:
        - $ref: '#/components/schemas/baseProject'
        - type:
            - object
          properties:
            team:
              $ref: '#/components/schemas/webhookTeam'
    logRow:
      type:
        - object
      description: A single log entry.
      properties:
        uuid:
          type:
            - string
          description: Unique identifier of the log entry.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
        severity_text:
          type:
            - string
          description: Human-readable severity level.
          examples:
            - INFO
        severity_number:
          type:
            - integer
          description: Numeric severity level (OpenTelemetry severity numbers).
          examples:
            - 9
        body:
          type:
            - string
          description: The log message body.
          examples:
            - User logged in successfully
        resource_attributes:
          type:
            - object
          description: Resource attributes (e.g. host.name, service.name).
          additionalProperties: true
        scope_attributes:
          type:
            - object
          description: Scope attributes (e.g. library information).
          additionalProperties: true
        attributes:
          type:
            - object
          description: Log attributes (e.g. request context).
          additionalProperties: true
        timestamp_unix_nano:
          type:
            - integer
          description: Timestamp in Unix nanoseconds.
          examples:
            - 1711360200000000000
    logInterval:
      type:
        - object
      description: The time interval used for the log query.
      properties:
        range:
          type:
            - string
          enum:
            - 1h
            - 12h
            - 7d
            - 14d
            - custom
          description: The interval range.
          examples:
            - 1h
        start:
          type:
            - string
          format: date-time
          description: Start of the interval (ISO 8601).
          examples:
            - '2026-03-25T11:00:00+00:00'
        end:
          type:
            - string
          format: date-time
          description: End of the interval (ISO 8601).
          examples:
            - '2026-03-25T12:00:00+00:00'
    monitoringMetrics:
      type:
        - object
      description: >-
        Aggregated performance metrics. All duration values are in milliseconds.
        Performance monitoring data is retained for 30 days in ClickHouse.
        Queries for older data will return empty results.
      properties:
        p50_ms:
          type:
            - number
          description: 50th percentile duration in milliseconds.
          examples:
            - 45.2
        p90_ms:
          type:
            - number
          description: 90th percentile duration in milliseconds.
          examples:
            - 120.5
        p95_ms:
          type:
            - number
          description: 95th percentile duration in milliseconds.
          examples:
            - 180.3
        p99_ms:
          type:
            - number
          description: 99th percentile duration in milliseconds.
          examples:
            - 350.0
        average_ms:
          type:
            - number
          description: Average duration in milliseconds.
          examples:
            - 65.8
        count:
          type:
            - integer
          description: Total number of occurrences.
          examples:
            - 1500
        error_rate:
          type:
            - number
          description: Error rate as a decimal (0.0 to 1.0).
          examples:
            - 0.02
        importance:
          type:
            - 'null'
            - number
          description: Computed importance score (available in list endpoints).
          examples:
            - 85.3
    monitoringTrend:
      type:
        - object
      description: Per-metric change percentages comparing the selected interval against the equivalent previous period.
      properties:
        p50_change:
          type:
            - number
          description: Percentage change in p50.
          examples:
            - -5.2
        p50_trend:
          type:
            - string
          enum:
            - positive_increase
            - positive_decrease
            - negative_increase
            - negative_decrease
            - none
          description: Direction and sentiment of p50 change.
          examples:
            - positive_decrease
        p90_change:
          type:
            - number
          examples:
            - -3.1
        p90_trend:
          type:
            - string
          enum:
            - positive_increase
            - positive_decrease
            - negative_increase
            - negative_decrease
            - none
          examples:
            - positive_decrease
        p95_change:
          type:
            - number
          examples:
            - 2.5
        p95_trend:
          type:
            - string
          enum:
            - positive_increase
            - positive_decrease
            - negative_increase
            - negative_decrease
            - none
          examples:
            - negative_increase
        p99_change:
          type:
            - number
          examples:
            - 0.0
        p99_trend:
          type:
            - string
          enum:
            - positive_increase
            - positive_decrease
            - negative_increase
            - negative_decrease
            - none
          examples:
            - none
        average_change:
          type:
            - number
          examples:
            - -1.8
        average_trend:
          type:
            - string
          enum:
            - positive_increase
            - positive_decrease
            - negative_increase
            - negative_decrease
            - none
          examples:
            - positive_decrease
        count_change:
          type:
            - number
          examples:
            - 10.0
        count_trend:
          type:
            - string
          enum:
            - positive_increase
            - positive_decrease
            - negative_increase
            - negative_decrease
            - none
          examples:
            - positive_increase
        error_rate_change:
          type:
            - number
          examples:
            - -0.5
        error_rate_trend:
          type:
            - string
          enum:
            - positive_increase
            - positive_decrease
            - negative_increase
            - negative_decrease
            - none
          examples:
            - positive_decrease
    monitoringInterval:
      type:
        - object
      description: The time interval used for the query.
      properties:
        range:
          type:
            - string
          enum:
            - 1h
            - 3h
            - 6h
            - 24h
            - 48h
            - 7d
            - 14d
            - custom
          description: The interval range.
          examples:
            - 24h
        start:
          type:
            - string
          format: date-time
          description: Start of the interval (ISO 8601).
          examples:
            - '2026-02-17T12:00:00+00:00'
        end:
          type:
            - string
          format: date-time
          description: End of the interval (ISO 8601).
          examples:
            - '2026-02-18T12:00:00+00:00'
    monitoringAggregation:
      type:
        - object
      description: A performance aggregation representing a grouped span (e.g., a route, query, job).
      properties:
        uuid:
          type:
            - string
          description: Unique identifier for the aggregation.
          examples:
            - a1b2c3d4-e5f6-7890-abcd-ef1234567890
        type:
          type:
            - string
          enum:
            - routes
            - queries
            - jobs
            - commands
            - external-http
            - views
            - livewire-components
          description: The aggregation type.
          examples:
            - routes
        name:
          type:
            - string
          description: Human-readable name of the aggregation.
          examples:
            - GET /api/users
        detail:
          description: >-
            Type-specific detail object. The shape varies by aggregation type.
          oneOf:
            - $ref: '#/components/schemas/routeDetail'
            - $ref: '#/components/schemas/queryDetail'
            - $ref: '#/components/schemas/jobDetail'
            - $ref: '#/components/schemas/commandDetail'
            - $ref: '#/components/schemas/externalHttpDetail'
            - $ref: '#/components/schemas/viewDetail'
            - $ref: '#/components/schemas/livewireComponentDetail'
        metrics:
          $ref: '#/components/schemas/monitoringMetrics'
    monitoringTimeSeriesPoint:
      type:
        - object
      description: A single data point in a time series.
      properties:
        timestamp:
          type:
            - string
          format: date-time
          description: The timestamp for this data point (ISO 8601).
          examples:
            - '2026-02-18T10:00:00+00:00'
        p50_ms:
          type:
            - number
          examples:
            - 42.1
        p90_ms:
          type:
            - number
          examples:
            - 98.7
        p95_ms:
          type:
            - number
          examples:
            - 150.3
        p99_ms:
          type:
            - number
          examples:
            - 280.0
        average_ms:
          type:
            - number
          examples:
            - 55.4
        count:
          type:
            - integer
          examples:
            - 120
        error_rate:
          type:
            - number
          examples:
            - 0.01
    monitoringTrace:
      type:
        - object
      description: A distributed trace containing all its spans.
      properties:
        trace_id:
          type:
            - string
          description: The trace identifier.
          examples:
            - abc123def456
        started_at:
          type:
            - string
          format: date-time
          description: When the trace started (ISO 8601).
          examples:
            - '2026-02-18T10:00:00+00:00'
        duration_ms:
          type:
            - number
          description: Total trace duration in milliseconds.
          examples:
            - 245.8
        spans:
          type:
            - array
          description: Flat array of spans. Use parent_span_id to build the tree.
          items:
            $ref: '#/components/schemas/monitoringSpan'
    monitoringSpan:
      type:
        - object
      description: A single span within a trace.
      properties:
        span_id:
          type:
            - string
          description: Unique span identifier.
          examples:
            - span-001
        parent_span_id:
          type:
            - 'null'
            - string
          description: Parent span ID (null for root spans).
          examples:
            - span-000
        name:
          type:
            - string
          description: Span name/operation.
          examples:
            - GET /api/users
        type:
          type:
            - string
          enum:
            - unknown
            - php_request
            - php_response
            - php_controller
            - php_query
            - redis_command
            - php_transaction
            - php_command
            - php_view
            - php_http_request
            - php_filesystem
            - php_application
            - php_application_registration
            - php_application_boot
            - php_application_terminating
            - php_notification
            - php_job
            - php_routing
            - php_global_before_middleware
            - php_before_middleware
            - php_after_middleware
            - php_global_after_middleware
            - laravel_job
            - laravel_queueing
            - laravel_livewire_component
            - laravel_livewire_component_mounting
            - laravel_livewire_component_premounting
            - laravel_livewire_component_hydrating
            - laravel_livewire_component_call
            - laravel_livewire_component_rendering
            - laravel_livewire_component_dehydrating
            - browser_pageload
            - browser_navigation
            - browser_fetch
            - browser_xhr
            - browser_component
            - browser_web_vital
          description: The span type.
          examples:
            - php_request
        started_at:
          type:
            - string
          format: date-time
          description: When the span started (ISO 8601).
          examples:
            - '2026-02-18T10:00:00+00:00'
        duration_ms:
          type:
            - number
          description: Span duration in milliseconds.
          examples:
            - 12.5
        failed:
          type:
            - boolean
          description: Whether the span represents a failed operation.
          examples:
            - false
        attributes:
          type:
            - object
          description: Span attributes (key-value pairs).
          additionalProperties: true
          examples:
            - http.method: GET
              http.route: /api/users
        events:
          type:
            - array
          description: Span events (exceptions, logs, cache ops, dumps).
          items:
            type:
              - object
            properties:
              name:
                type:
                  - string
                description: Event name.
                examples:
                  - exception
              type:
                type:
                  - string
                enum:
                  - unknown
                  - php_log
                  - php_glow
                  - php_dump
                  - php_exception
                  - php_cache
                description: Event type.
                examples:
                  - php_exception
              timestamp:
                type:
                  - string
                format: date-time
                description: Event timestamp (ISO 8601).
                examples:
                  - '2026-02-18T10:00:01+00:00'
              attributes:
                type:
                  - object
                description: Event attributes.
                additionalProperties: true
        resource:
          type:
            - 'null'
            - object
          description: OpenTelemetry resource attributes for this span.
          additionalProperties: true
        context:
          type:
            - 'null'
            - object
          description: Span context attributes.
          additionalProperties: true
    monitoringLinkCount:
      type:
        - object
      description: Count of linked aggregations by type.
      properties:
        type:
          type:
            - string
          enum:
            - routes
            - queries
            - jobs
            - commands
            - external-http
            - views
            - livewire-components
          description: The linked aggregation type.
          examples:
            - queries
        label:
          type:
            - string
          description: Human-readable label for the type.
          examples:
            - Queries
        count:
          type:
            - integer
          description: Number of linked aggregations of this type.
          examples:
            - 5
    routeDetail:
      type:
        - object
      description: Detail for route aggregations.
      properties:
        route:
          type:
            - string
          description: The HTTP route pattern.
          examples:
            - /api/users/{id}
        method:
          type:
            - string
          description: The HTTP request method.
          examples:
            - GET
        entry_point_handler_name:
          type:
            - string
          description: The handler name for this route.
          examples:
            - App\Http\Controllers\UserController
        views:
          type:
            - 'null'
            - integer
          description: Number of views rendered.
          examples:
            - 3
        exceptions:
          type:
            - 'null'
            - integer
          description: Number of exceptions thrown.
          examples:
            - 0
        http_code_1xx:
          type:
            - 'null'
            - integer
          description: Count of 1xx HTTP status codes.
          examples:
            - 0
        http_code_2xx:
          type:
            - 'null'
            - integer
          description: Count of 2xx HTTP status codes.
          examples:
            - 1200
        http_code_3xx:
          type:
            - 'null'
            - integer
          description: Count of 3xx HTTP status codes.
          examples:
            - 50
        http_code_4xx:
          type:
            - 'null'
            - integer
          description: Count of 4xx HTTP status codes.
          examples:
            - 15
        http_code_5xx:
          type:
            - 'null'
            - integer
          description: Count of 5xx HTTP status codes.
          examples:
            - 2
        http_codes:
          type:
            - object
          description: Map of specific HTTP status codes to their counts.
          additionalProperties:
            type:
              - integer
          examples:
            - '200': 1100
              '201': 100
              '404': 15
              '500': 2
    queryDetail:
      type:
        - object
      description: Detail for database query aggregations.
      properties:
        statement:
          type:
            - string
          description: The SQL statement.
          examples:
            - 'select * from "users" where "id" = ?'
        system:
          type:
            - string
          description: The database system.
          examples:
            - postgresql
        laravel_connection:
          type:
            - string
          description: The Laravel database connection name.
          examples:
            - pgsql
    jobDetail:
      type:
        - object
      description: Detail for job aggregations.
      properties:
        name:
          type:
            - string
          description: The job name.
          examples:
            - ProcessPodcast
        class:
          type:
            - string
          description: The job class.
          examples:
            - App\Jobs\ProcessPodcast
    commandDetail:
      type:
        - object
      description: Detail for artisan command aggregations.
      properties:
        command:
          type:
            - string
          description: The command signature.
          examples:
            - 'inspire'
    externalHttpDetail:
      type:
        - object
      description: Detail for external HTTP request aggregations.
      properties:
        method:
          type:
            - string
          description: The HTTP request method.
          examples:
            - POST
        serverAddress:
          type:
            - string
          description: The external server address.
          examples:
            - api.stripe.com
        urlPath:
          type:
            - string
          description: The URL path.
          examples:
            - /v1/charges
        http_code_1xx:
          type:
            - 'null'
            - integer
          description: Count of 1xx HTTP status codes.
        http_code_2xx:
          type:
            - 'null'
            - integer
          description: Count of 2xx HTTP status codes.
        http_code_3xx:
          type:
            - 'null'
            - integer
          description: Count of 3xx HTTP status codes.
        http_code_4xx:
          type:
            - 'null'
            - integer
          description: Count of 4xx HTTP status codes.
        http_code_5xx:
          type:
            - 'null'
            - integer
          description: Count of 5xx HTTP status codes.
        http_codes:
          type:
            - object
          description: Map of specific HTTP status codes to their counts.
          additionalProperties:
            type:
              - integer
    viewDetail:
      type:
        - object
      description: Detail for view aggregations.
      properties:
        name:
          type:
            - string
          description: The view name.
          examples:
            - users.index
        type:
          type:
            - string
          enum:
            - view
            - component
            - inline_component
          description: The view type.
          examples:
            - view
    livewireComponentDetail:
      type:
        - object
      description: Detail for Livewire component aggregations.
      properties:
        name:
          type:
            - string
          description: The Livewire component name.
          examples:
            - user-table
        class:
          type:
            - string
          description: The Livewire component class.
          examples:
            - App\Livewire\UserTable
paths:
  /me:
    get:
      operationId: get-authenticated-user
      tags:
        - user
      summary: Get the authenticated user.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user'
  /projects:
    get:
      operationId: list-projects
      tags:
        - projects
      summary: Get all projects.
      parameters:
        - in: query
          name: filter[id]
          required: false
          schema:
            type:
              - integer
          description: The project identifier.
        - in: query
          name: filter[name]
          required: false
          schema:
            type:
              - string
          description: The project name.
        - in: query
          name: filter[team_id]
          required: false
          schema:
            type:
              - integer
          description: The team identifier.
        - in: query
          name: include
          required: false
          schema:
            type:
              - string
            enum:
              - team
          description: Include information about the team.
        - $ref: '#/components/parameters/PageNumber'
        - $ref: '#/components/parameters/PageSize'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/paginatedResult'
                  - type:
                      - object
                    properties:
                      data:
                        type:
                          - array
                        items:
                          $ref: '#/components/schemas/project'
    post:
      operationId: create-project
      tags:
        - projects
      summary: Create a new project.
      security:
        - OAuth2: [admin]
        - BearerAuth: []
        - UserAPIToken: []
      requestBody:
        content:
          application/json:
            schema:
              required:
                - name
                - team_id
                - stage
                - technology
              properties:
                name:
                  type:
                    - string
                  description: The project's name.
                  examples:
                    - Flare
                team_id:
                  type:
                    - integer
                  description: The team's identifier.
                  examples:
                    - 1
                stage:
                  type:
                    - string
                  enum:
                    - local
                    - development
                    - staging
                    - production
                  description: The project's stage.
                  examples:
                    - production
                technology:
                  type:
                    - string
                  enum:
                    - Laravel
                    - PHP
                    - JS
                    - Vue
                    - React
                    - Svelte
                  description: The project's technology.
                  examples:
                    - PHP
                group:
                  type:
                    - 'null'
                    - string
                  examples:
                    - Flare dev
                  description: The project's group.
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/project'
  /projects/{project_id}:
    delete:
      operationId: delete-project
      tags:
        - projects
      summary: Delete a project.
      security:
        - OAuth2: [admin]
        - BearerAuth: []
        - UserAPIToken: []
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            type:
              - integer
          description: The project identifier.
      responses:
        '204':
          description: Successful response
  /projects/{project_id}/errors:
    get:
      operationId: list-project-errors
      tags:
        - errors
      summary: Get all errors within a project.
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            type:
              - integer
          description: The project identifier.
        - in: query
          name: filter[id]
          required: false
          schema:
            type:
              - integer
          description: The project identifier.
        - in: query
          name: filter[exception_message]
          required: false
          schema:
            type:
              - string
          description: The exception message of the error.
        - in: query
          name: filter[exception_class]
          required: false
          schema:
            type:
              - string
          description: The exception class of the error.
        - in: query
          name: filter[file]
          required: false
          schema:
            type:
              - string
          description: The file where the error occurred.
        - in: query
          name: filter[status]
          required: false
          schema:
            type:
              - string
            enum:
              - open
              - resolved
          description: The status of the error.
        - in: query
          name: filter[stage]
          required: false
          schema:
            type:
              - string
          description: The stage of the error.
        - in: query
          name: filter[level]
          required: false
          schema:
            type:
              - string
            enum:
              - debug
              - info
              - notice
              - warning
              - error
              - critical
              - alert
              - emergency
          description: The message log level of the error.
        - in: query
          name: filter[seen_between]
          required: false
          schema:
            type:
              - string
            examples:
              - 2020-07-16T16:41:59Z,2020-08-16T16:41:59Z
          description: The date and time when the error was seen between.
        - in: query
          name: include
          required: false
          schema:
            type:
              - string
            enum:
              - assignees
          description: Include related resources. Use 'assignees' to include assigned users.
        - in: query
          name: sort
          required: false
          schema:
            type:
              - string
            enum:
              - first_seen_at
              - last_seen_at
              - '-first_seen_at'
              - '-last_seen_at'
        - $ref: '#/components/parameters/PageNumber'
        - $ref: '#/components/parameters/PageSize'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/paginatedResult'
                  - type:
                      - object
                    properties:
                      data:
                        type:
                          - array
                        items:
                          $ref: '#/components/schemas/error'
  /projects/{project_id}/error-count:
    get:
      operationId: get-project-error-count
      tags:
        - errors
      summary: Get the number of errors in the given period.
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            type:
              - integer
          description: The project identifier.
        - in: query
          name: start_date
          required: true
          description: The start date of the period. Accepts ISO 8601 (e.g. 2021-01-01T00:00:00Z) or Y-m-d H:i:s format.
          schema:
            type:
              - string
            format: date-time
            examples:
              - '2021-01-01T00:00:00.000Z'
        - in: query
          name: end_date
          required: true
          description: The end date of the period. Accepts ISO 8601 (e.g. 2021-01-31T23:59:59Z) or Y-m-d H:i:s format.
          schema:
            type:
              - string
            format: date-time
            examples:
              - '2021-01-31T23:59:59.000Z'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  count:
                    type:
                      - integer
                    description: The number of errors that occurred.
  /projects/{project_id}/error-occurrence-count:
    get:
      operationId: get-project-error-occurrence-count
      tags:
        - errors
      summary: Get the number of error occurrences in the given period.
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            type:
              - integer
          description: The project identifier.
        - in: query
          name: start_date
          required: true
          description: The start date of the period. Accepts ISO 8601 (e.g. 2021-01-01T00:00:00Z) or Y-m-d H:i:s format.
          schema:
            type:
              - string
            format: date-time
            examples:
              - '2021-01-01T00:00:00.000Z'
        - in: query
          name: end_date
          required: true
          description: The end date of the period. Accepts ISO 8601 (e.g. 2021-01-31T23:59:59Z) or Y-m-d H:i:s format.
          schema:
            type:
              - string
            format: date-time
            examples:
              - '2021-01-31T23:59:59.000Z'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  count:
                    type:
                      - integer
                    description: The number of error occurrences that occurred.
  /teams/{team_id}:
    get:
      operationId: get-team
      tags:
        - teams
      summary: Get a team.
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            type:
              - integer
          description: The team identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team'
  /teams/{team_id}/users/{user_id}:
    delete:
      operationId: remove-team-user
      tags:
        - teams
      summary: Remove a user from a team.
      security:
        - OAuth2: [admin]
        - BearerAuth: []
        - UserAPIToken: []
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            type:
              - integer
          description: The team identifier.
        - in: path
          name: user_id
          required: true
          schema:
            type:
              - integer
          description: The user identifier.
      responses:
        '200':
          description: Successful response
  /errors/{error_id}/occurrences:
    get:
      operationId: list-error-occurrences
      tags:
        - error occurrences
      summary: Get all occurrences for an error.
      parameters:
        - in: path
          name: error_id
          required: true
          schema:
            type:
              - integer
          description: The error identifier.
        - in: query
          name: sort
          required: false
          schema:
            type:
              - string
            enum:
              - received_at
              - '-received_at'
        - $ref: '#/components/parameters/PageNumber'
        - $ref: '#/components/parameters/PageSize'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/paginatedResult'
                  - type:
                      - object
                    properties:
                      data:
                        type:
                          - array
                        items:
                          $ref: '#/components/schemas/errorOccurrence'
  /errors/{error_id}/resolve:
    post:
      operationId: resolve-error
      tags:
        - errors
      summary: Resolve an error.
      security:
        - OAuth2: [write]
        - BearerAuth: []
        - UserAPIToken: []
      parameters:
        - in: path
          name: error_id
          required: true
          schema:
            type:
              - integer
          description: The error identifier.
      requestBody:
        content:
          application/json:
            schema:
              properties:
                comment:
                  type:
                    - string
                  description: >-
                    An optional comment to record on the error's activity
                    timeline alongside this action.
                  examples:
                    - Resolved after deploying the fix.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /errors/{error_id}/open:
    post:
      operationId: unresolve-error
      tags:
        - errors
      summary: Reopen an error.
      security:
        - OAuth2: [write]
        - BearerAuth: []
        - UserAPIToken: []
      parameters:
        - in: path
          name: error_id
          required: true
          schema:
            type:
              - integer
          description: The error identifier.
      requestBody:
        content:
          application/json:
            schema:
              properties:
                comment:
                  type:
                    - string
                  description: >-
                    An optional comment to record on the error's activity
                    timeline alongside this action.
                  examples:
                    - Reopening, the issue is back.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /errors/{error_id}/snooze:
    post:
      operationId: snooze-error
      tags:
        - errors
      summary: Snooze an error.
      security:
        - OAuth2: [write]
        - BearerAuth: []
        - UserAPIToken: []
      parameters:
        - in: path
          name: error_id
          required: true
          schema:
            type:
              - integer
          description: The error identifier.
      requestBody:
        content:
          application/json:
            schema:
              required:
                - snooze_type
              properties:
                snooze_type:
                  type:
                    - string
                  enum:
                    - snooze_until
                    - snooze_forever
                    - snooze_number_of_occurrences
                    - snooze_application_version
                  description: The type of snooze to apply.
                  examples:
                    - snooze_forever
                snooze_until:
                  type:
                    - string
                  format: date-time
                  description: >-
                    The date and time until which the error should be snoozed.
                    Required when snooze_type is snooze_until. Must be in the
                    future.
                  examples:
                    - '2025-12-31T23:59:59.000Z'
                snooze_number_of_occurrences:
                  type:
                    - integer
                  minimum: 1
                  description: >-
                    The number of occurrences to snooze for. Required when
                    snooze_type is snooze_number_of_occurrences.
                  examples:
                    - 10
                comment:
                  type:
                    - string
                  description: >-
                    An optional comment to record on the error's activity
                    timeline alongside this action.
                  examples:
                    - Snoozing until the next release.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /errors/{error_id}/unsnooze:
    post:
      operationId: unsnooze-error
      tags:
        - errors
      summary: Unsnooze an error.
      security:
        - OAuth2: [write]
        - BearerAuth: []
        - UserAPIToken: []
      parameters:
        - in: path
          name: error_id
          required: true
          schema:
            type:
              - integer
          description: The error identifier.
      requestBody:
        content:
          application/json:
            schema:
              properties:
                comment:
                  type:
                    - string
                  description: >-
                    An optional comment to record on the error's activity
                    timeline alongside this action.
                  examples:
                    - Unsnoozing to investigate again.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /errors/{error_id}/notes:
    post:
      operationId: create-error-note
      tags:
        - errors
      summary: Add a note to an error.
      parameters:
        - in: path
          name: error_id
          required: true
          schema:
            type:
              - integer
          description: The error identifier.
      requestBody:
        content:
          application/json:
            schema:
              required:
                - note
              properties:
                note:
                  type:
                    - string
                  description: The note to record on the error's activity timeline.
                  examples:
                    - Investigated this one, it only happens on the legacy API.
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /error-occurrences/{occurrence_id}:
    get:
      operationId: get-error-occurrence
      tags:
        - error occurrences
      summary: Get an error occurrence.
      parameters:
        - in: path
          name: occurrence_id
          required: true
          schema:
            type:
              - integer
          description: The error occurrence identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorOccurrence'
  /error-occurrences/{occurrence_id}/previous-exceptions/{previous_exception_id}:
    get:
      operationId: get-error-occurrence-previous-exception
      tags:
        - error occurrences
      summary: Get the frames of a previous exception in an occurrence's exception chain.
      description: >-
        Returns 404 if the given previous exception does not belong to the
        occurrence.
      parameters:
        - in: path
          name: occurrence_id
          required: true
          schema:
            type:
              - integer
          description: The error occurrence identifier.
        - in: path
          name: previous_exception_id
          required: true
          schema:
            type:
              - integer
          description: >-
            The id of the previous exception, taken from the occurrence's
            previous_exceptions array.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  exception_class:
                    type:
                      - string
                    description: The class of the previous exception.
                    examples:
                      - PDOException
                  exception_message:
                    type:
                      - string
                    description: The message of the previous exception.
                    examples:
                      - SQLSTATE[HY000] [2002] Connection refused
                  frames:
                    type:
                      - array
                    description: The frames of the previous exception.
                    items:
                      $ref: '#/components/schemas/errorOccurrenceFrame'
  /projects/{project_id}/monitoring/summary:
    get:
      operationId: get-monitoring-summary
      tags:
        - performance monitoring
      summary: Get the monitoring dashboard summary.
      description: >-
        Returns high-level metrics and trends for routes, jobs, commands, and
        queries in a single call, plus the top-10 slowest routes and queries
        (by p95). Performance monitoring data is retained for 30 days.
        Queries for older data will return empty results.
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            type:
              - integer
          description: The project identifier.
        - in: query
          name: filter[interval]
          required: false
          schema:
            type:
              - string
            enum:
              - 1h
              - 3h
              - 6h
              - 24h
              - 48h
              - 7d
              - 14d
            default: 24h
          description: 'Time interval for the summary (default 24h). Also accepts custom:START,END with ISO 8601 dates (e.g. custom:2021-01-01T00:00:00Z,2021-01-31T23:59:59Z).'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  data:
                    type:
                      - object
                    properties:
                      interval:
                        $ref: '#/components/schemas/monitoringInterval'
                      routes:
                        type:
                          - object
                        properties:
                          metrics:
                            $ref: '#/components/schemas/monitoringMetrics'
                          trend:
                            $ref: '#/components/schemas/monitoringTrend'
                      jobs:
                        type:
                          - object
                        properties:
                          metrics:
                            $ref: '#/components/schemas/monitoringMetrics'
                          trend:
                            $ref: '#/components/schemas/monitoringTrend'
                      commands:
                        type:
                          - object
                        properties:
                          metrics:
                            $ref: '#/components/schemas/monitoringMetrics'
                          trend:
                            $ref: '#/components/schemas/monitoringTrend'
                      queries:
                        type:
                          - object
                        properties:
                          metrics:
                            $ref: '#/components/schemas/monitoringMetrics'
                          trend:
                            $ref: '#/components/schemas/monitoringTrend'
                      slowest_routes:
                        type:
                          - array
                        description: Top 10 slowest routes by p95.
                        items:
                          $ref: '#/components/schemas/monitoringAggregation'
                      slowest_queries:
                        type:
                          - array
                        description: Top 10 slowest queries by p95.
                        items:
                          $ref: '#/components/schemas/monitoringAggregation'
  /projects/{project_id}/monitoring/{type}:
    get:
      operationId: list-monitoring-aggregations
      tags:
        - performance monitoring
      summary: List aggregations by type.
      description: >-
        Returns a paginated, filterable, sortable list of aggregations for the
        given type. Duration filter values (p50, p90, p95, p99, average) are
        accepted in milliseconds. Performance monitoring data is retained for
        30 days. Queries for older data will return empty results.
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            type:
              - integer
          description: The project identifier.
        - in: path
          name: type
          required: true
          schema:
            type:
              - string
            enum:
              - routes
              - queries
              - jobs
              - commands
              - external-http
              - views
              - livewire-components
          description: The aggregation type.
        - in: query
          name: filter[interval]
          required: false
          schema:
            type:
              - string
            enum:
              - 1h
              - 3h
              - 6h
              - 24h
              - 48h
              - 7d
              - 14d
            default: 24h
          description: 'Time interval (default 24h). Also accepts custom:START,END with ISO 8601 dates (e.g. custom:2021-01-01T00:00:00Z,2021-01-31T23:59:59Z).'
        - in: query
          name: filter[search]
          required: false
          schema:
            type:
              - string
          description: Free-text search filter.
        - $ref: '#/components/parameters/FilterP50Eq'
        - $ref: '#/components/parameters/FilterP50Neq'
        - $ref: '#/components/parameters/FilterP50Gt'
        - $ref: '#/components/parameters/FilterP50Gte'
        - $ref: '#/components/parameters/FilterP50Lt'
        - $ref: '#/components/parameters/FilterP50Lte'
        - $ref: '#/components/parameters/FilterP90Eq'
        - $ref: '#/components/parameters/FilterP90Neq'
        - $ref: '#/components/parameters/FilterP90Gt'
        - $ref: '#/components/parameters/FilterP90Gte'
        - $ref: '#/components/parameters/FilterP90Lt'
        - $ref: '#/components/parameters/FilterP90Lte'
        - $ref: '#/components/parameters/FilterP95Eq'
        - $ref: '#/components/parameters/FilterP95Neq'
        - $ref: '#/components/parameters/FilterP95Gt'
        - $ref: '#/components/parameters/FilterP95Gte'
        - $ref: '#/components/parameters/FilterP95Lt'
        - $ref: '#/components/parameters/FilterP95Lte'
        - $ref: '#/components/parameters/FilterP99Eq'
        - $ref: '#/components/parameters/FilterP99Neq'
        - $ref: '#/components/parameters/FilterP99Gt'
        - $ref: '#/components/parameters/FilterP99Gte'
        - $ref: '#/components/parameters/FilterP99Lt'
        - $ref: '#/components/parameters/FilterP99Lte'
        - $ref: '#/components/parameters/FilterAverageEq'
        - $ref: '#/components/parameters/FilterAverageNeq'
        - $ref: '#/components/parameters/FilterAverageGt'
        - $ref: '#/components/parameters/FilterAverageGte'
        - $ref: '#/components/parameters/FilterAverageLt'
        - $ref: '#/components/parameters/FilterAverageLte'
        - $ref: '#/components/parameters/FilterCountEq'
        - $ref: '#/components/parameters/FilterCountNeq'
        - $ref: '#/components/parameters/FilterCountGt'
        - $ref: '#/components/parameters/FilterCountGte'
        - $ref: '#/components/parameters/FilterCountLt'
        - $ref: '#/components/parameters/FilterCountLte'
        - $ref: '#/components/parameters/FilterThroughputEq'
        - $ref: '#/components/parameters/FilterThroughputNeq'
        - $ref: '#/components/parameters/FilterThroughputGt'
        - $ref: '#/components/parameters/FilterThroughputGte'
        - $ref: '#/components/parameters/FilterThroughputLt'
        - $ref: '#/components/parameters/FilterThroughputLte'
        - $ref: '#/components/parameters/FilterErrorRateEq'
        - $ref: '#/components/parameters/FilterErrorRateNeq'
        - $ref: '#/components/parameters/FilterErrorRateGt'
        - $ref: '#/components/parameters/FilterErrorRateGte'
        - $ref: '#/components/parameters/FilterErrorRateLt'
        - $ref: '#/components/parameters/FilterErrorRateLte'
        - in: query
          name: sort
          required: false
          schema:
            type:
              - string
            enum:
              - p50
              - p90
              - p95
              - p99
              - average
              - count
              - throughput
              - error_rate
              - importance
              - '-p50'
              - '-p90'
              - '-p95'
              - '-p99'
              - '-average'
              - '-count'
              - '-throughput'
              - '-error_rate'
              - '-importance'
            default: '-p95'
          description: 'Sort field. Prefix with - for descending (default: -p95).'
        - $ref: '#/components/parameters/PageNumber'
        - in: query
          name: page[size]
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 30
            default: 15
          description: Number of items per page (default 15, maximum 30).
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  data:
                    type:
                      - array
                    items:
                      $ref: '#/components/schemas/monitoringAggregation'
                  meta:
                    type:
                      - object
                    properties:
                      current_page:
                        type:
                          - integer
                        examples:
                          - 1
                      total:
                        type:
                          - integer
                        description: Total number of matching aggregations.
                        examples:
                          - 42
                      per_page:
                        type:
                          - integer
                        examples:
                          - 15
                      last_page:
                        type:
                          - integer
                        examples:
                          - 3
                      interval:
                        $ref: '#/components/schemas/monitoringInterval'
                      totals:
                        description: Aggregate metrics across ALL matching rows (not just current page).
                        $ref: '#/components/schemas/monitoringMetrics'
  /projects/{project_id}/monitoring/{type}/time-series:
    get:
      operationId: get-monitoring-time-series
      tags:
        - performance monitoring
      summary: Get time series data for an aggregation type.
      description: >-
        Returns lightweight time series data for graphing. Precision is
        auto-selected based on the interval: minute for ≤24h, hour for ≤14d,
        day otherwise. Accepts the same filter parameters as the list endpoint.
        Performance monitoring data is retained for 30 days.
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            type:
              - integer
          description: The project identifier.
        - in: path
          name: type
          required: true
          schema:
            type:
              - string
            enum:
              - routes
              - queries
              - jobs
              - commands
              - external-http
              - views
              - livewire-components
          description: The aggregation type.
        - in: query
          name: filter[interval]
          required: false
          schema:
            type:
              - string
            enum:
              - 1h
              - 3h
              - 6h
              - 24h
              - 48h
              - 7d
              - 14d
            default: 24h
          description: 'Time interval (default 24h). Also accepts custom:START,END with ISO 8601 dates (e.g. custom:2021-01-01T00:00:00Z,2021-01-31T23:59:59Z).'
        - in: query
          name: uuid
          required: false
          schema:
            type:
              - string
          description: Optional aggregation UUID to scope the time series to a single aggregation.
        - in: query
          name: filter[search]
          required: false
          schema:
            type:
              - string
          description: Free-text search filter.
        - $ref: '#/components/parameters/FilterP50Eq'
        - $ref: '#/components/parameters/FilterP50Neq'
        - $ref: '#/components/parameters/FilterP50Gt'
        - $ref: '#/components/parameters/FilterP50Gte'
        - $ref: '#/components/parameters/FilterP50Lt'
        - $ref: '#/components/parameters/FilterP50Lte'
        - $ref: '#/components/parameters/FilterP90Eq'
        - $ref: '#/components/parameters/FilterP90Neq'
        - $ref: '#/components/parameters/FilterP90Gt'
        - $ref: '#/components/parameters/FilterP90Gte'
        - $ref: '#/components/parameters/FilterP90Lt'
        - $ref: '#/components/parameters/FilterP90Lte'
        - $ref: '#/components/parameters/FilterP95Eq'
        - $ref: '#/components/parameters/FilterP95Neq'
        - $ref: '#/components/parameters/FilterP95Gt'
        - $ref: '#/components/parameters/FilterP95Gte'
        - $ref: '#/components/parameters/FilterP95Lt'
        - $ref: '#/components/parameters/FilterP95Lte'
        - $ref: '#/components/parameters/FilterP99Eq'
        - $ref: '#/components/parameters/FilterP99Neq'
        - $ref: '#/components/parameters/FilterP99Gt'
        - $ref: '#/components/parameters/FilterP99Gte'
        - $ref: '#/components/parameters/FilterP99Lt'
        - $ref: '#/components/parameters/FilterP99Lte'
        - $ref: '#/components/parameters/FilterAverageEq'
        - $ref: '#/components/parameters/FilterAverageNeq'
        - $ref: '#/components/parameters/FilterAverageGt'
        - $ref: '#/components/parameters/FilterAverageGte'
        - $ref: '#/components/parameters/FilterAverageLt'
        - $ref: '#/components/parameters/FilterAverageLte'
        - $ref: '#/components/parameters/FilterCountEq'
        - $ref: '#/components/parameters/FilterCountNeq'
        - $ref: '#/components/parameters/FilterCountGt'
        - $ref: '#/components/parameters/FilterCountGte'
        - $ref: '#/components/parameters/FilterCountLt'
        - $ref: '#/components/parameters/FilterCountLte'
        - $ref: '#/components/parameters/FilterThroughputEq'
        - $ref: '#/components/parameters/FilterThroughputNeq'
        - $ref: '#/components/parameters/FilterThroughputGt'
        - $ref: '#/components/parameters/FilterThroughputGte'
        - $ref: '#/components/parameters/FilterThroughputLt'
        - $ref: '#/components/parameters/FilterThroughputLte'
        - $ref: '#/components/parameters/FilterErrorRateEq'
        - $ref: '#/components/parameters/FilterErrorRateNeq'
        - $ref: '#/components/parameters/FilterErrorRateGt'
        - $ref: '#/components/parameters/FilterErrorRateGte'
        - $ref: '#/components/parameters/FilterErrorRateLt'
        - $ref: '#/components/parameters/FilterErrorRateLte'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  data:
                    type:
                      - object
                    properties:
                      precision:
                        type:
                          - string
                        enum:
                          - minute
                          - hour
                          - day
                        description: The auto-selected time series precision.
                        examples:
                          - minute
                      interval:
                        $ref: '#/components/schemas/monitoringInterval'
                      points:
                        type:
                          - array
                        items:
                          $ref: '#/components/schemas/monitoringTimeSeriesPoint'
  /aggregations/{type}/{uuid}:
    get:
      operationId: get-monitoring-aggregation
      tags:
        - performance monitoring
      summary: Get a single aggregation with detail.
      description: >-
        Returns detailed metrics, trends, and relationship link counts for a
        single aggregation. Use the include parameter to also load time series,
        parent, and/or child aggregations. Trend data is null when a custom
        interval range is used. Performance monitoring data is retained for 30 days.
      parameters:
        - in: path
          name: type
          required: true
          schema:
            type:
              - string
            enum:
              - routes
              - queries
              - jobs
              - commands
              - external-http
              - views
              - livewire-components
          description: The aggregation type.
        - in: path
          name: uuid
          required: true
          schema:
            type:
              - string
          description: The aggregation UUID.
        - in: query
          name: filter[interval]
          required: false
          schema:
            type:
              - string
            enum:
              - 1h
              - 3h
              - 6h
              - 24h
              - 48h
              - 7d
              - 14d
            default: 24h
          description: 'Time interval (default 24h). Also accepts custom:START,END with ISO 8601 dates (e.g. custom:2021-01-01T00:00:00Z,2021-01-31T23:59:59Z).'
        - $ref: '#/components/parameters/FilterP50Eq'
        - $ref: '#/components/parameters/FilterP50Neq'
        - $ref: '#/components/parameters/FilterP50Gt'
        - $ref: '#/components/parameters/FilterP50Gte'
        - $ref: '#/components/parameters/FilterP50Lt'
        - $ref: '#/components/parameters/FilterP50Lte'
        - $ref: '#/components/parameters/FilterP90Eq'
        - $ref: '#/components/parameters/FilterP90Neq'
        - $ref: '#/components/parameters/FilterP90Gt'
        - $ref: '#/components/parameters/FilterP90Gte'
        - $ref: '#/components/parameters/FilterP90Lt'
        - $ref: '#/components/parameters/FilterP90Lte'
        - $ref: '#/components/parameters/FilterP95Eq'
        - $ref: '#/components/parameters/FilterP95Neq'
        - $ref: '#/components/parameters/FilterP95Gt'
        - $ref: '#/components/parameters/FilterP95Gte'
        - $ref: '#/components/parameters/FilterP95Lt'
        - $ref: '#/components/parameters/FilterP95Lte'
        - $ref: '#/components/parameters/FilterP99Eq'
        - $ref: '#/components/parameters/FilterP99Neq'
        - $ref: '#/components/parameters/FilterP99Gt'
        - $ref: '#/components/parameters/FilterP99Gte'
        - $ref: '#/components/parameters/FilterP99Lt'
        - $ref: '#/components/parameters/FilterP99Lte'
        - $ref: '#/components/parameters/FilterAverageEq'
        - $ref: '#/components/parameters/FilterAverageNeq'
        - $ref: '#/components/parameters/FilterAverageGt'
        - $ref: '#/components/parameters/FilterAverageGte'
        - $ref: '#/components/parameters/FilterAverageLt'
        - $ref: '#/components/parameters/FilterAverageLte'
        - $ref: '#/components/parameters/FilterCountEq'
        - $ref: '#/components/parameters/FilterCountNeq'
        - $ref: '#/components/parameters/FilterCountGt'
        - $ref: '#/components/parameters/FilterCountGte'
        - $ref: '#/components/parameters/FilterCountLt'
        - $ref: '#/components/parameters/FilterCountLte'
        - $ref: '#/components/parameters/FilterThroughputEq'
        - $ref: '#/components/parameters/FilterThroughputNeq'
        - $ref: '#/components/parameters/FilterThroughputGt'
        - $ref: '#/components/parameters/FilterThroughputGte'
        - $ref: '#/components/parameters/FilterThroughputLt'
        - $ref: '#/components/parameters/FilterThroughputLte'
        - $ref: '#/components/parameters/FilterErrorRateEq'
        - $ref: '#/components/parameters/FilterErrorRateNeq'
        - $ref: '#/components/parameters/FilterErrorRateGt'
        - $ref: '#/components/parameters/FilterErrorRateGte'
        - $ref: '#/components/parameters/FilterErrorRateLt'
        - $ref: '#/components/parameters/FilterErrorRateLte'
        - in: query
          name: include
          required: false
          schema:
            type:
              - string
          description: >-
            Comma-separated list of optional includes: time_series, parents,
            children. Example: include=time_series,parents,children
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  data:
                    type:
                      - object
                    properties:
                      aggregation:
                        $ref: '#/components/schemas/monitoringAggregation'
                      trend:
                        description: Null when a custom interval range is used.
                        oneOf:
                          - $ref: '#/components/schemas/monitoringTrend'
                          - type: 'null'
                      interval:
                        $ref: '#/components/schemas/monitoringInterval'
                      parent_links:
                        type:
                          - array
                        description: Counts of parent aggregations grouped by type.
                        items:
                          $ref: '#/components/schemas/monitoringLinkCount'
                      child_links:
                        type:
                          - array
                        description: Counts of child aggregations grouped by type.
                        items:
                          $ref: '#/components/schemas/monitoringLinkCount'
                      time_series:
                        description: Only present when include=time_series is requested.
                        type:
                          - object
                        properties:
                          precision:
                            type:
                              - string
                            enum:
                              - minute
                              - hour
                              - day
                          points:
                            type:
                              - array
                            items:
                              $ref: '#/components/schemas/monitoringTimeSeriesPoint'
                      parents:
                        description: >-
                          Only present when include=parents is requested.
                          Object keyed by aggregation type, each containing an array of aggregations.
                        type:
                          - object
                        additionalProperties:
                          type:
                            - array
                          items:
                            $ref: '#/components/schemas/monitoringAggregation'
                      children:
                        description: >-
                          Only present when include=children is requested.
                          Object keyed by aggregation type, each containing an array of aggregations.
                        type:
                          - object
                        additionalProperties:
                          type:
                            - array
                          items:
                            $ref: '#/components/schemas/monitoringAggregation'
  /aggregations/{type}/{uuid}/traces:
    get:
      operationId: list-aggregation-traces
      tags:
        - performance monitoring
      summary: List traces for an aggregation.
      description: >-
        Returns a paginated list of lightweight traces for the given aggregation.
        Uses a fixed 6-hour lookback window (not configurable). For full span
        details, use the show trace endpoint. Performance monitoring data is
        retained for 30 days.
      parameters:
        - in: path
          name: type
          required: true
          schema:
            type:
              - string
            enum:
              - routes
              - queries
              - jobs
              - commands
              - external-http
              - views
              - livewire-components
          description: The aggregation type.
        - in: path
          name: uuid
          required: true
          schema:
            type:
              - string
          description: The aggregation UUID.
        - in: query
          name: sort
          required: false
          schema:
            type:
              - string
            enum:
              - slowest
              - fastest
              - latest
              - oldest
            default: slowest
          description: Sort order (default slowest).
        - in: query
          name: page[number]
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number.
        - in: query
          name: page[size]
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 30
            default: 10
          description: Number of items per page (default 10, maximum 30).
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  data:
                    type:
                      - array
                    items:
                      type:
                        - object
                      properties:
                        trace_id:
                          type:
                            - string
                          description: The trace identifier.
                          examples:
                            - abc123def456
                        started_at:
                          type:
                            - string
                          format: date-time
                          description: When the trace started (ISO 8601).
                          examples:
                            - '2026-02-18T10:00:00+00:00'
                        duration_ms:
                          type:
                            - number
                          description: Trace duration in milliseconds.
                          examples:
                            - 245.8
                  meta:
                    type:
                      - object
                    properties:
                      current_page:
                        type:
                          - integer
                        examples:
                          - 1
                      total:
                        type:
                          - integer
                        examples:
                          - 25
                      per_page:
                        type:
                          - integer
                        examples:
                          - 10
                      last_page:
                        type:
                          - integer
                        examples:
                          - 3
                      interval:
                        type:
                          - object
                        description: The fixed 6-hour lookback window.
                        properties:
                          start:
                            type:
                              - string
                            format: date-time
                          end:
                            type:
                              - string
                            format: date-time
                          fixed_window:
                            type:
                              - string
                            description: Always "6h".
                            examples:
                              - 6h
  /traces/{traceId}:
    get:
      operationId: get-trace
      tags:
        - performance monitoring
      summary: Get the full span tree for a trace.
      description: >-
        Returns the complete span tree for a trace, including all span events,
        resources, and contexts. Spans are returned as a flat array — use
        parent_span_id to build the tree on the consumer side. All durations
        are in milliseconds. Performance monitoring data is retained for 30 days.
      parameters:
        - in: path
          name: traceId
          required: true
          schema:
            type:
              - string
          description: The trace identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  data:
                    $ref: '#/components/schemas/monitoringTrace'
  /projects/{project_id}/logs:
    get:
      operationId: list-logs
      tags:
        - logging
      summary: List log entries with cursor pagination.
      description: >-
        Returns log entries for the given project using cursor-based pagination.
        Results are ordered by timestamp. Use the cursor parameters to paginate
        through results. Supports filtering by severity, search text, hostname,
        entry point type, and time interval.
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            type:
              - integer
          description: The project ID.
        - in: query
          name: cursor[timestamp]
          schema:
            type:
              - integer
          description: >-
            The `timestamp_unix_nano` of the last seen row. Used together with
            `cursor[uuid]` for cursor pagination.
        - in: query
          name: cursor[uuid]
          schema:
            type:
              - string
          description: >-
            The UUID of the last seen row. Used together with
            `cursor[timestamp]` for cursor pagination.
        - in: query
          name: cursor[direction]
          schema:
            type:
              - string
            enum:
              - before
              - after
          description: >-
            Direction of pagination relative to `cursor[timestamp]` +
            `cursor[uuid]`. `before` fetches rows older than the cursor,
            `after` fetches rows newer. Ignored when no cursor is supplied.
        - in: query
          name: order
          schema:
            type:
              - string
            enum:
              - asc
              - desc
            default: desc
          description: >-
            Order of rows in the response. `desc` (default) returns newest
            first, `asc` returns oldest first.
        - in: query
          name: page[size]
          schema:
            type:
              - integer
            default: 100
            minimum: 1
            maximum: 1000
          description: Number of log entries per page (default 100, max 1000).
        - in: query
          name: filter[interval]
          schema:
            type:
              - string
            enum:
              - 1h
              - 12h
              - 7d
              - 14d
          description: >-
            Time interval range. Defaults to `1h`. Use
            `custom:START,END` with ISO 8601 dates for a custom range.
        - in: query
          name: filter[search]
          schema:
            type:
              - string
          description: Free text search on the log body.
        - in: query
          name: filter[severity_number]
          schema:
            type:
              - string
          description: >-
            Comma-separated severity numbers to filter by
            (e.g. `9,13,17`).
        - in: query
          name: filter[hostname]
          schema:
            type:
              - string
          description: Comma-separated hostnames to filter by.
        - in: query
          name: filter[entry_point_type]
          schema:
            type:
              - string
          description: >-
            Comma-separated entry point types to filter by
            (e.g. `web,cli`).
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  data:
                    type:
                      - array
                    items:
                      $ref: '#/components/schemas/logRow'
                  meta:
                    type:
                      - object
                    properties:
                      has_more:
                        type:
                          - boolean
                        description: Whether more results are available.
                      server_time:
                        type:
                          - string
                        format: date-time
                        description: Server time at the moment of the response (ISO 8601).
                      interval:
                        $ref: '#/components/schemas/logInterval'
