openapi: 3.0.0
info:
  description: "API for managing Metoro environments, alerts, and dashboards."
  license:
    name: Proprietary
    url: https://metoro.io/terms
  title: Metoro API
  version: 1.0.0
servers:
- description: Production API server
  url: https://us-east.metoro.io/api/v1
- description: Demo API server
  url: https://demo.us-east.metoro.io/api/v1
paths:
  /query/logs:
    post:
      description: Search for logs matching the provided query.
      operationId: queryLogs
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/QueryLogsRequest"
        description: Query to execute to retrieve logs
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/QueryLogsResponse"
          description: Logs retrieved successfully
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Bad request
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unauthorized
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal server error
      tags:
      - Logs
  /environments/create:
    post:
      description: Create a new environment in the Metoro platform.
      operationId: createEnvironment
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateEnvironmentRequest"
        description: Environment to create
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateEnvironmentResponse"
          description: Environment created successfully
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Bad request
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unauthorized
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal server error
      security:
      - bearerAuth: []
      summary: Create Environment
      tags:
      - Environments
  /alerts/update:
    post:
      description: 'Create a new alert based on the provided configuration or update
        an existing one if the alert.metadata.id matches an existing alert. '
      operationId: createUpdateAlert
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpdateAlertRequest"
        description: Alert to create or update
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateAlertResponse"
          description: Alert created or updated successfully
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Bad request
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unauthorized
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal server error
      security:
      - bearerAuth: []
      summary: Create/Update Alert
      tags:
      - Alerts
  /alerts/sync:
    get:
      description: "Trigger immediate synchronization of alerts from Kubernetes sources,\
        \ including ConfigMaps and MetoroAlert CRDs. By default, alerts are synced\
        \ once every hour. This endpoint allows triggering the sync process manually\
        \ without waiting for the scheduled sync."
      operationId: syncAlertsFromConfigMaps
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SyncAlertsResponse"
          description: Alert synchronization initiated successfully
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unauthorized
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal server error
      security:
      - bearerAuth: []
      summary: Sync Alerts From Kubernetes Sources
      tags:
      - Alerts
  /dashboards/update:
    post:
      description: Create a new dashboard based on the provided configuration or update
        an existing one if the dashboard.metadata.id matches an existing dashboard.
      operationId: createUpdateDashboard
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpdateDashboardRequest"
        description: Dashboard to create or update
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateUpdateDashboardResponse"
          description: Dashboard created or updated successfully
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Bad request
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unauthorized
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Forbidden
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal server error
      security:
      - bearerAuth: []
      summary: Create/Update Dashboard
      tags:
      - Dashboards
  /dashboards/sync:
    get:
      description: "Trigger immediate synchronization of dashboards from Kubernetes\
        \ sources, including ConfigMaps and MetoroDashboard CRDs. By default, dashboards\
        \ are synced once every hour. This endpoint allows triggering the sync process\
        \ manually without waiting for the scheduled sync."
      operationId: syncDashboardsFromConfigMaps
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SyncDashboardsResponse"
          description: Dashboard synchronization initiated successfully
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unauthorized
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Forbidden
        "500":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal server error
      security:
      - bearerAuth: []
      summary: Sync Dashboards From Kubernetes Sources
      tags:
      - Dashboards
components:
  schemas:
    QueryLogsRequest:
      description: Request to query logs
      example:
        query: "count(logs{log_level=\"error\", service.name=\"/k8s/default/redis-test-app\"\
          })"
        startTime: 1750147200000
        endTime: 1750150800000
        limit: 1000
      properties:
        query:
          description: MetoroQL query to execute to retrieve logs.
          type: string
        startTime:
          description: "Unix timestamp in milliseconds to start querying logs from,\
            \ inclusive. Shorter time ranges will lead to faster responses."
          format: int64
          type: integer
        endTime:
          description: "Unix timestamp in milliseconds to stop querying logs at, inclusive.\
            \ Shorter time ranges will lead to faster responses."
          format: int64
          type: integer
        limit:
          description: Maximum number of logs to return. Defaults to 100 if not provided.
            Must be between 1 and 1000.
          type: integer
      required:
      - endTime
      - query
      - startTime
      type: object
    QueryLogsResponse:
      description: "Response containing logs matching the query, ordered by timestamp\
        \ ascending"
      example:
        count: 2
        logs:
        - timestamp: 1750147200000
          log_level: error
          message: Error connecting to Redis
          attributes:
            service.name: /k8s/default/redis
            container.id: /k8s/default/redis-test-app-7f76f54f-2k8vx/redis-test-app
            environment: production
            custom.attribute: value
        - timestamp: 1750147260000
          log_level: error
          message: Terminating Redis connection
          attributes:
            service.name: /k8s/default/redis
            container.id: /k8s/default/redis-test-app-7f76f54f-2k8vx/redis-test-app
            environment: production
            custom.attribute: value
      properties:
        count:
          description: Total number of logs matching the query
          type: integer
        logs:
          description: "List of logs matching the query, ordered"
          items:
            $ref: "#/components/schemas/LogEntry"
          type: array
    LogEntry:
      description: Log entry object
      example:
        timestamp: 1750147200000
        log_level: error
        message: Error connecting to Redis
        attributes:
          service.name: /k8s/default/redis
          container.id: /k8s/default/redis-test-app-7f76f54f-2k8vx/redis-test-app
          environment: production
          custom.attribute: value
      properties:
        timestamp:
          description: Timestamp of the log entry in milliseconds since epoch
          format: int64
          type: integer
        log_level:
          description: "Log level of the entry (e.g., error, info, debug)"
          type: string
        message:
          description: Log message content
          type: string
        attributes:
          description: "Attributes associated with the log entry in key-value format.\
            \ This will include metoro generated attributes like service.name, container.id,\
            \ and environment as well as any custom attributes from strucutured json\
            \ logs."
          type: object
      required:
      - attributes
      - log_level
      - message
      - timestamp
    Error:
      example:
        error: "Invalid alert configuration: missing required field"
      properties:
        error:
          description: Error message describing what went wrong
          type: string
      required:
      - error
      type: object
    CreateEnvironmentRequest:
      description: Request to create a new environment
      example:
        environment:
          name: my-environment
      properties:
        environment:
          $ref: "#/components/schemas/Environment"
      required:
      - environment
      type: object
    Environment:
      description: Environment object
      example:
        name: my-environment
      properties:
        name:
          description: Name of the environment
          type: string
      required:
      - name
      type: object
    CreateEnvironmentResponse:
      description: Response for creating a new environment
      example:
        token: eyJ...
      properties:
        name:
          description: Name of the environment that was created
          type: string
        token:
          description: Token to send allow sending of data to Metoro
          type: string
      required:
      - name
      - token
      type: object
    CreateUpdateAlertRequest:
      description: "Request to create a new alert or update an existing one. If alert.metadata.id\
        \ is provided and matches an existing alert, that alert will be updated."
      example:
        alert:
          metadata:
            name: name
            description: description
            id: 123e4567-e89b-12d3-a456-426614174000
          timeseries:
            expression:
              metoroQLTimeseries:
                query: count(traces)
                bucketSize: 60
            evaluationRules:
            - static:
                persistenceSettings:
                  datapointsToAlarm: 3
                  missingDatapointBehavior: notBreaching
                  datapointsInEvaluationWindow: 5
                operators:
                - threshold: 5000
                  operator: greaterThan
              name: name
              type: static
              actions:
              - slackDestination:
                  channel: my-alerts-channel
                type: slack
              - emailDestination:
                  emails:
                  - user@example.com
                  - admin@example.com
                type: email
          type: timeseries
      properties:
        alert:
          $ref: "#/components/schemas/Alert"
      required:
      - alert
      type: object
    Alert:
      example:
        metadata:
          name: name
          description: description
          id: 123e4567-e89b-12d3-a456-426614174000
        type: timeseries
        investigateOnFire: false
        timeseries:
          expression:
            metoroQLTimeseries:
              query: count(traces)
              bucketSize: 60
          evaluationRules:
          - static:
              persistenceSettings:
                datapointsToAlarm: 3
                missingDatapointBehavior: notBreaching
                datapointsInEvaluationWindow: 5
              operators:
              - threshold: 5000
                operator: greaterThan
            name: name
            type: static
            actions:
            - slackDestination:
                channel: my-alerts-channel
              type: slack
            - emailDestination:
                emails:
                - user@example.com
                - admin@example.com
              type: email
      properties:
        metadata:
          $ref: "#/components/schemas/MetadataObject"
        type:
          $ref: "#/components/schemas/AlertType"
        investigateOnFire:
          description: Whether Metoro should automatically start an AI investigation
            when this alert fires.
          type: boolean
        timeseries:
          $ref: "#/components/schemas/TimeseriesConfig"
      required:
      - metadata
      - timeseries
      type: object
    MetadataObject:
      example:
        name: name
        description: description
        id: 123e4567-e89b-12d3-a456-426614174000
      properties:
        name:
          description: Name of the alert
          type: string
        description:
          description: Description of the alert with additional context
          type: string
        folderPath:
          default: /alerts/default/
          description: "Path to the folder where the alert is stored. Must start with\
            \ `/alerts/`. Must end with `/`. The generated filesystem path will be\
            \ `{folderPath}{id}`."
          pattern: \/alerts\/.*
          type: string
        tags:
          description: Organization-wide tags used to group and filter the alert.
          items:
            maxLength: 64
            minLength: 1
            type: string
          maxItems: 20
          type: array
        id:
          description: Unique identifier for the alert.
          minLength: 8
          type: string
      required:
      - id
      - name
      type: object
    AlertType:
      description: Type of alert
      enum:
      - timeseries
      type: string
    TimeseriesConfig:
      example:
        expression:
          metoroQLTimeseries:
            query: count(traces)
            bucketSize: 60
        evaluationRules:
        - static:
            persistenceSettings:
              datapointsToAlarm: 3
              missingDatapointBehavior: notBreaching
              datapointsInEvaluationWindow: 5
            operators:
            - threshold: 5000
              operator: greaterThan
          name: name
          type: static
          actions:
          - slackDestination:
              channel: my-alerts-channel
            type: slack
          - emailDestination:
              emails:
              - user@example.com
              - admin@example.com
            type: email
      properties:
        expression:
          $ref: "#/components/schemas/ExpressionConfig"
        evaluationRules:
          description: Rules for evaluating the metrics and triggering alerts
          items:
            $ref: "#/components/schemas/Condition"
          type: array
      required:
      - evaluationRules
      - expression
      type: object
    ExpressionConfig:
      example:
        metoroQLTimeseries:
          query: count(traces)
          bucketSize: 60
      properties:
        metoroQLTimeseries:
          $ref: "#/components/schemas/MetoroQlTimeseries"
      type: object
    MetoroQlTimeseries:
      example:
        query: count(traces)
        bucketSize: 60
      properties:
        query:
          description: MetoroQL query to use for the timeseries.
          type: string
        bucketSize:
          description: "The size of each bucket to aggregate data into in seconds.\
            \ For example, if the bucket size is 60, the data will be aggregated into\
            \ 1 minute buckets."
          format: int64
          type: integer
      required:
      - bucketSize
      - query
      type: object
    Condition:
      example:
        static:
          persistenceSettings:
            datapointsToAlarm: 3
            missingDatapointBehavior: notBreaching
            datapointsInEvaluationWindow: 5
          operators:
          - threshold: 5000
            operator: greaterThan
        name: name
        type: static
        actions:
        - slackDestination:
            channel: my-alerts-channel
          type: slack
        - emailDestination:
            emails:
            - user@example.com
            - admin@example.com
          type: email
      properties:
        name:
          description: Name of the condition
          type: string
        type:
          $ref: "#/components/schemas/ConditionType"
        static:
          $ref: "#/components/schemas/StaticCondition"
        anomaly:
          $ref: "#/components/schemas/AnomalyCondition"
        actions:
          description: Actions to take when condition is met
          items:
            $ref: "#/components/schemas/Action"
          type: array
      required:
      - name
      type: object
    ConditionType:
      description: Type of alert condition
      enum:
      - static
      - anomaly
      type: string
    StaticCondition:
      example:
        persistenceSettings:
          datapointsToAlarm: 3
          missingDatapointBehavior: notBreaching
          datapointsInEvaluationWindow: 5
        operators:
        - threshold: 5000
          operator: greaterThan
      properties:
        operators:
          description: List of operator conditions that must be met
          items:
            $ref: "#/components/schemas/OperatorConfig"
          type: array
        persistenceSettings:
          $ref: "#/components/schemas/PersistenceSettings"
      required:
      - operators
      - persistenceSettings
      type: object
    PersistenceSettings:
      example:
        datapointsToAlarm: 3
        missingDatapointBehavior: notBreaching
        datapointsInEvaluationWindow: 5
      properties:
        datapointsToAlarm:
          description: Number of data points that must breach the threshold within
            the evaluation window to trigger an alert.
          format: int64
          type: integer
        datapointsInEvaluationWindow:
          description: "Total number of data points in the evaluation window. If your\
            \ bucketSize is 60 (seconds) and datapointsInEvaluationWindow is 5, then\
            \ the evaluation window is 5 minutes."
          format: int64
          type: integer
        missingDatapointBehavior:
          default: notBreaching
          description: Determines how missing data points are treated - either as
            breaching the threshold or not breaching.
          enum:
          - breaching
          - notBreaching
          type: string
      required:
      - datapointsInEvaluationWindow
      - datapointsToAlarm
      type: object
    AnomalyCondition:
      properties:
        algorithm:
          description: Algorithm to use for anomaly detection
          enum:
          - zScore
          type: string
        zScoreParameters:
          $ref: "#/components/schemas/ZScoreParameters"
      required:
      - algorithm
    ZScoreParameters:
      description: Parameters for Z-Score anomaly detection
      example:
        threshold: 2.0
        dataPointsInBaselineWindow: 30
      properties:
        operator:
          $ref: "#/components/schemas/AnomalyOperatorType"
        threshold:
          description: Z-Score threshold for anomaly detection (number of standard
            deviations from the mean to consider as an anomaly).
          format: double
          type: number
        dataPointsInBaselineWindow:
          description: Number of data points to consider for calculating the the baseline
            normal distribution.
          format: int64
          type: integer
        dataPointsInEvaluationWindow:
          description: "Number of data points in the evaluation window, if you want\
            \ to select 5 out of 10 data points, set this to 10."
          format: int64
          type: integer
        dataPointsToAlarm:
          description: Number of data points that must breach the threshold within
            the evaluation window to trigger an alert.
          format: int64
          type: integer
      required:
      - dataPointsInBaselineWindow
      - dataPointsInEvaluationWindow
      - dataPointsToAlarm
      - threshold
      type: object
    AnomalyOperatorType:
      description: Type of anomaly threshold comparison operator
      enum:
      - greaterThan
      - lessThan
      - greaterOrLessThan
      type: string
      x-enum-varnames:
      - ANOMALY_OPERATOR_TYPE_GREATER_THAN
      - ANOMALY_OPERATOR_TYPE_LESS_THAN
      - ANOMALY_OPERATOR_TYPE_GREATER_OR_LESS_THAN
    Action:
      example:
        slackDestination:
          channel: my-alerts-channel
        emailDestination:
          emails:
          - user@example.com
          - admin@example.com
        pagerDutyDestination:
          serviceId: serviceId
          serviceName: serviceName
        type: slack
        webhookDestination:
          name: name
          uuid: uuid
      properties:
        type:
          description: Type of action destination
          enum:
          - slack
          - pagerDuty
          - email
          - webhook
          type: string
        slackDestination:
          $ref: "#/components/schemas/Action_slackDestination"
        pagerDutyDestination:
          $ref: "#/components/schemas/Action_pagerDutyDestination"
        emailDestination:
          $ref: "#/components/schemas/Action_emailDestination"
        webhookDestination:
          $ref: "#/components/schemas/Action_webhookDestination"
      required:
      - type
      type: object
    Action_slackDestination:
      example:
        channel: channel
      properties:
        channel:
          description: Slack channel to send alert to
          type: string
        notifyOnResolve:
          default: false
          description: Whether to notify the channel when the alert is resolved
          type: boolean
      type: object
    Action_pagerDutyDestination:
      example:
        serviceId: serviceId
        serviceName: serviceName
      properties:
        serviceId:
          description: PagerDuty service ID
          type: string
        serviceName:
          description: PagerDuty service name
          type: string
      type: object
    Action_emailDestination:
      example:
        emails:
        - user@example.com
        - admin@example.com
      properties:
        notifyOnResolve:
          default: false
          description: Whether to notify the email recipients when the alert is resolved
          type: boolean
        emails:
          description: Email addresses to send alert to
          items:
            type: string
          type: array
      type: object
    Action_webhookDestination:
      example:
        name: name
        uuid: uuid
      properties:
        uuid:
          description: UUID of the webhook configuration to use for notifying that
            the alert is triggered
          type: string
        name:
          description: Name of the webhook configuration to use for notifying that
            the alert is triggered
          type: string
        resolved_uuid:
          description: UUID of the webhook configuration to use for notifying that
            the alert is resolved
          type: string
        resolved_name:
          description: Name of the webhook configuration to use for notifying that
            the alert is resolved
          type: string
      type: object
    CreateAlertResponse:
      example:
        id: 123e4567-e89b-12d3-a456-426614174000
      properties:
        id:
          description: Unique identifier for the created or updated alert
          type: string
      required:
      - id
      type: object
    SyncAlertsResponse:
      example:
        success: true
        message: Alert synchronization initiated successfully
      properties:
        success:
          description: Whether the sync operation was initiated successfully
          type: boolean
        message:
          description: Information about the sync operation
          type: string
      required:
      - success
      type: object
    CreateUpdateDashboardRequest:
      description: Request to create or update a dashboard
      example:
        dashboard:
          settings:
            hideGlobalEnvironmentSelector: false
            defaultTimeRange: defaultTimeRange
            layoutVersion: 0
          metadata:
            id: id
            title: title
            folderPath: /dashboards/default/
          content:
            variables:
            - defaultValue: defaultValue
              overridable: true
              name: name
              selectorSettings:
                metricName: metricName
                attribute: attribute
            - defaultValue: defaultValue
              overridable: true
              name: name
              selectorSettings:
                metricName: metricName
                attribute: attribute
            title: title
            description: Related widgets for this section
            widgets: []
      properties:
        dashboard:
          $ref: "#/components/schemas/Dashboard"
      required:
      - dashboard
      type: object
    Dashboard:
      description: Dashboard object
      example:
        settings:
          hideGlobalEnvironmentSelector: false
          defaultTimeRange: defaultTimeRange
          layoutVersion: 0
        metadata:
          id: id
          title: title
          folderPath: /dashboards/default/
        content:
          variables:
          - defaultValue: defaultValue
            overridable: true
            name: name
            selectorSettings:
              metricName: metricName
              attribute: attribute
          - defaultValue: defaultValue
            overridable: true
            name: name
            selectorSettings:
              metricName: metricName
              attribute: attribute
          title: title
          description: Related widgets for this section
          widgets: []
      properties:
        metadata:
          $ref: "#/components/schemas/DashboardMetadata"
        content:
          $ref: "#/components/schemas/GroupWidget"
        settings:
          $ref: "#/components/schemas/DashboardSettings"
      required:
      - content
      - metadata
      type: object
    DashboardMetadata:
      description: Metadata for dashboard
      example:
        id: id
        title: title
        folderPath: /dashboards/default/
      properties:
        title:
          description: Dashboard title
          type: string
        id:
          description: Unique identifier for the dashboard
          type: string
        folderPath:
          default: /dashboards/default/
          description: "Path to the folder where the dashboard is stored. Must start\
            \ with `/dashboards/`. Must end with `/`. The generated filesystem path\
            \ will be `{folderPath}{id}`."
          pattern: \/dashboards\/.*
          type: string
        tags:
          description: Organization-wide tags used to group and filter the dashboard.
          items:
            maxLength: 64
            minLength: 1
            type: string
          maxItems: 20
          type: array
      required:
      - id
      type: object
    GroupWidget:
      description: Widget for grouping other widgets
      example:
        variables:
        - defaultValue: defaultValue
          overridable: true
          name: name
          selectorSettings:
            metricName: metricName
            attribute: attribute
        - defaultValue: defaultValue
          overridable: true
          name: name
          selectorSettings:
            metricName: metricName
            attribute: attribute
        title: title
        description: Related widgets for this section
        widgets: []
      properties:
        title:
          description: Group title
          type: string
        description:
          description: "Optional group description. When present, Metoro displays\
            \ it as an info tooltip next to the group title."
          type: string
        widgets:
          description: Array of widgets in the group
          items:
            $ref: "#/components/schemas/Widget"
          type: array
        variables:
          description: Variables available in this group
          items:
            $ref: "#/components/schemas/Variable"
          type: array
      type: object
    Widget:
      description: Dashboard widget
      properties:
        type:
          description: Type of widget
          enum:
          - group
          - markdown
          - chart
          - stat
          - table
          - gauge
          - barGauge
          - pie
          - trace
          - log
          type: string
        position:
          $ref: "#/components/schemas/Position"
        group:
          $ref: "#/components/schemas/GroupWidget"
        markdown:
          $ref: "#/components/schemas/MarkdownWidget"
        chart:
          $ref: "#/components/schemas/ChartWidget"
        stat:
          $ref: "#/components/schemas/StatWidget"
        table:
          $ref: "#/components/schemas/TableWidget"
        gauge:
          $ref: "#/components/schemas/GaugeWidget"
        barGauge:
          $ref: "#/components/schemas/BarGaugeWidget"
        pie:
          $ref: "#/components/schemas/PieChartWidget"
        trace:
          $ref: "#/components/schemas/TraceWidget"
        log:
          $ref: "#/components/schemas/LogWidget"
      required:
      - type
      type: object
    Position:
      description: Position configuration for widget placement
      properties:
        type:
          description: Type of positioning
          enum:
          - absolute
          type: string
        absolute:
          $ref: "#/components/schemas/Position_absolute"
      required:
      - type
      type: object
    Position_absolute:
      description: Absolute positioning coordinates. Version 2 dashboards use 24 columns
        and an unbounded row grid. Dashboards without a layoutVersion are legacy 12-column
        dashboards and are scaled when opened in the UI.
      example:
        w: 1
        x: 0
        h: 7
        "y": 7
      properties:
        x:
          description: X coordinate (0-24)
          maximum: 24
          minimum: 0
          type: integer
        "y":
          description: Y coordinate
          minimum: 0
          type: integer
        w:
          description: Width (0-24)
          maximum: 24
          minimum: 0
          type: integer
        h:
          description: Height
          minimum: 0
          type: integer
      required:
      - h
      - w
      - x
      - "y"
      type: object
    MarkdownWidget:
      description: Widget for displaying markdown content. Supports any markdown that
        is compatible with the CommonMark (https://commonmark.org/) format.
      example:
        content: content
        description: Explains the markdown note.
      properties:
        description:
          description: "Optional widget description. When present, Metoro displays\
            \ it as an info tooltip in the widget header."
          type: string
        content:
          description: Markdown content
          type: string
      required:
      - content
      type: object
    ChartWidget:
      description: Widget for displaying charts
      example:
        expression:
          metoroQLQueries:
          - displaySettings:
              label: label
              lineSettings:
                lineDotSize: 2
                lineType: solid
                lineColour: lineColour
                lineDotColor: lineDotColor
            query: query
            bucketSize: 5
          - displaySettings:
              label: label
              lineSettings:
                lineDotSize: 2
                lineType: solid
                lineColour: lineColour
                lineDotColor: lineDotColor
            query: query
            bucketSize: 5
        chartType: line
        title: title
        description: "CPU time spent busy vs idle, split by activity type"
        displaySettings:
          thresholds:
            steps:
            - value: 50
              color: "#2DD881"
              name: Low
            - value: 80
              color: "#FFFF00"
              name: Medium
            - value: 90
              color: "#FF0000"
              name: High
      properties:
        title:
          description: Chart title
          type: string
        description:
          description: "Optional widget description. When present, Metoro displays\
            \ it as an info tooltip next to the widget title."
          type: string
        chartType:
          default: line
          description: Type of chart
          enum:
          - line
          - area
          - bar
          type: string
        expression:
          $ref: "#/components/schemas/ChartWidget_expression"
        displaySettings:
          $ref: "#/components/schemas/ChartWidgetDisplaySettings"
      type: object
    ChartWidget_expression:
      description: Expression timeseries data to be shown on the chart
      example:
        queryMode: metoroql
        metoroQLQueries:
        - displaySettings:
            label: label
            lineSettings:
              lineDotSize: 2
              lineType: solid
              lineColour: lineColour
              lineDotColor: lineDotColor
          query: query
          bucketSize: 5
        - displaySettings:
            label: label
            lineSettings:
              lineDotSize: 2
              lineType: solid
              lineColour: lineColour
              lineDotColor: lineDotColor
          query: query
          bucketSize: 5
      properties:
        queryMode:
          description: "Query mode used by the chart expression. When omitted, Metoro\
            \ infers the mode from the populated query arrays."
          enum:
          - standard
          - metoroql
          - promql
          type: string
        metoroQLQueries:
          description: Array of MetoroQL queries
          items:
            $ref: "#/components/schemas/MetoroQLQuery"
          type: array
        promQLQueries:
          description: Array of PromQL queries
          items:
            $ref: "#/components/schemas/PromQLQuery"
          type: array
      type: object
    ChartWidgetDisplaySettings:
      description: Display settings for chart widget visualization
      example:
        thresholds:
          steps:
          - value: 50
            color: "#2DD881"
            name: Low
          - value: 80
            color: "#FFFF00"
            name: Medium
          - value: 90
            color: "#FF0000"
            name: High
      properties:
        thresholds:
          $ref: "#/components/schemas/ChartWidgetDisplaySettings_thresholds"
      type: object
    ChartWidgetDisplaySettings_thresholds:
      description: Threshold settings for chart visualization
      properties:
        steps:
          description: Array of threshold steps
          items:
            $ref: "#/components/schemas/ChartWidgetDisplaySettings_thresholds_steps_inner"
          type: array
      type: object
    ChartWidgetDisplaySettings_thresholds_steps_inner:
      properties:
        value:
          description: Threshold value
          format: double
          type: number
        color:
          description: Color in hex format for this threshold level
          type: string
        name:
          description: Name for this threshold level
          type: string
      required:
      - value
      type: object
    StatWidget:
      description: Widget for displaying statistics
      example:
        expression:
          reduceAggregation: max
          metoroQLQuery:
            query: query
            bucketSize: 5
        displaySettings:
          globalSettings:
            valuePrecision: 9
            filterableColumn: filterableColumn
            fontSize: text-xs
          valueSettings:
          - formatSpecifier: $value cores used
            colorSettings:
              color: color
              type: text
            matchingOperators:
            - threshold: 7
              operator: greaterThan
            - threshold: 7
              operator: greaterThan
          - formatSpecifier: $value cores used
            colorSettings:
              color: color
              type: text
            matchingOperators:
            - threshold: 7
              operator: greaterThan
            - threshold: 7
              operator: greaterThan
          columnSettings:
          - hiddenByDefault: true
            column: column
            regexExtractor: regexExtractor
            title: title
          - hiddenByDefault: true
            column: column
            regexExtractor: regexExtractor
            title: title
        title: title
        description: Current CPU usage reduced over the selected time range
      properties:
        title:
          description: Stat title
          type: string
        description:
          description: "Optional widget description. When present, Metoro displays\
            \ it as an info tooltip next to the widget title."
          type: string
        expression:
          $ref: "#/components/schemas/StatWidget_expression"
        displaySettings:
          $ref: "#/components/schemas/StatDisplaySettings"
      type: object
    StatWidget_expression:
      description: Query expression for stat data
      example:
        reduceAggregation: max
        metoroQLQuery:
          displaySettings:
            label: label
            lineSettings:
              lineDotSize: 2
              lineType: solid
              lineColour: lineColour
              lineDotColor: lineDotColor
          query: query
          bucketSize: 5
      properties:
        metoroQLQuery:
          $ref: "#/components/schemas/MetoroQLQuery"
        promQLQuery:
          $ref: "#/components/schemas/PromQLQuery"
        queryMode:
          description: "Query mode used by the stat expression. When omitted, Metoro\
            \ infers the mode from the populated query field."
          enum:
          - standard
          - metoroql
          - promql
          type: string
        reduceAggregation:
          description: Aggregation method
          enum:
          - max
          - min
          - avg
          - sum
          - count
          type: string
      required:
      - reduceAggregation
      type: object
    StatDisplaySettings:
      description: Display settings for stat widget
      example:
        globalSettings:
          valuePrecision: 9
          filterableColumn: filterableColumn
          fontSize: text-xs
        valueSettings:
        - formatSpecifier: $value cores used
          colorSettings:
            color: color
            type: text
          matchingOperators:
          - threshold: 7
            operator: greaterThan
          - threshold: 7
            operator: greaterThan
        - formatSpecifier: $value cores used
          colorSettings:
            color: color
            type: text
          matchingOperators:
          - threshold: 7
            operator: greaterThan
          - threshold: 7
            operator: greaterThan
        columnSettings:
        - hiddenByDefault: true
          column: column
          regexExtractor: regexExtractor
          title: title
        - hiddenByDefault: true
          column: column
          regexExtractor: regexExtractor
          title: title
      properties:
        valueSettings:
          description: Settings for value display
          items:
            $ref: "#/components/schemas/ValueSettings"
          type: array
        columnSettings:
          description: Settings for columns
          items:
            $ref: "#/components/schemas/ColumnVisualSetting"
          type: array
        globalSettings:
          $ref: "#/components/schemas/GlobalSettings"
      type: object
    ValueSettings:
      description: Settings for conditional value formatting
      example:
        formatSpecifier: $value cores used
        colorSettings:
          color: color
          type: text
        matchingOperators:
        - threshold: 7
          operator: greaterThan
        - operator: range
          range:
            from: 5
            to: 10
      properties:
        matchingOperators:
          description: Operators for matching conditions
          items:
            $ref: "#/components/schemas/ValueSettings_matchingOperators_inner"
          type: array
        colorSettings:
          $ref: "#/components/schemas/ValueSettings_colorSettings"
        formatSpecifier:
          description: Format string for value display
          example: $value cores used
          type: string
      type: object
    ValueSettings_matchingOperators_inner:
      example:
        operator: greaterThan
        threshold: 7
      properties:
        operator:
          description: Comparison operator
          enum:
          - greaterThan
          - lessThan
          - greaterThanOrEqual
          - lessThanOrEqual
          - equals
          - notEquals
          - range
          type: string
        threshold:
          description: Threshold value for comparison (used with operators other than
            'range')
          format: double
          type: number
        range:
          $ref: "#/components/schemas/ValueSettings_matchingOperators_inner_range"
      required:
      - operator
      type: object
      x-examples:
        threshold-operator:
          value:
            operator: greaterThan
            threshold: 7
          summary: Example with threshold-based operator
        range-operator:
          value:
            operator: range
            range:
              from: 5
              to: 10
          summary: Example with range-based operator
    ValueSettings_matchingOperators_inner_range:
      description: Range values for comparison when operator is 'range'
      properties:
        from:
          description: Start value of the range
          format: double
          type: number
        to:
          description: End value of the range
          format: double
          type: number
      required:
      - from
      - to
      type: object
    ValueSettings_colorSettings:
      description: Color settings for matches
      example:
        color: color
        type: text
      properties:
        type:
          description: Type of coloring
          enum:
          - text
          - background
          type: string
        color:
          description: Color value
          type: string
      type: object
    ColumnVisualSetting:
      description: Visual settings for a column
      example:
        alignment: left
        width: 180
        isFilterable: true
        hiddenByDefault: true
        column: column
        regexExtractor: regexExtractor
        unitOverride: By
        title: title
      properties:
        column:
          description: Column identifier
          type: string
        title:
          description: Display title for column
          type: string
        hiddenByDefault:
          description: Whether column is hidden by default
          type: boolean
        regexExtractor:
          description: Regex pattern for extracting values
          type: string
        unitOverride:
          description: Unit to use when formatting numeric values in this column
          type: string
        width:
          description: Column width in pixels
          format: int64
          type: integer
        alignment:
          description: Column content alignment
          enum:
          - auto
          - left
          - center
          - right
          type: string
        isFilterable:
          description: Whether this column should be used for text filtering
          type: boolean
        hideGeneratedAttributeColumns:
          description: Whether generated stat attribute columns should be hidden when
            this column is visible
          type: boolean
      required:
      - column
      type: object
    GlobalSettings:
      description: Global display settings
      example:
        unitOverride: ms
        valuePrecision: 9
        filterableColumn: filterableColumn
        fontSize: text-xs
      properties:
        valuePrecision:
          default: 0
          description: Precision for numeric values
          format: int64
          type: integer
        fontSize:
          description: Font size for display
          enum:
          - text-xs
          - text-sm
          - text-base
          - text-lg
          - text-xl
          - text-2xl
          type: string
        filterableColumn:
          description: Column that can be filtered
          type: string
        unitOverride:
          description: Optional unit override for the displayed value.
          type: string
        showRawValues:
          description: "When true, display full unabbreviated values with thousands\
            \ separators instead of compact abbreviations"
          type: boolean
      type: object
    TableWidget:
      description: Widget for displaying metric query results in a table
      example:
        title: CPU by service
        description: "CPU usage by service, reduced over the selected time range"
        expression:
          reduceAggregation: lastNotNull
          metoroQLQueries:
          - query: sum(container_resources_cpu_usage_seconds_total) by (service.name)
            bucketSize: 60
        displaySettings:
          showHeader: true
          enablePagination: true
          minColumnWidth: 120
          cellHeight: medium
          frozenColumns: 1
          columnSettings:
          - column: attributes.service.name
            title: Service
            isFilterable: true
          - column: value
            title: CPU
            alignment: right
        valuePrecision: 2
      properties:
        title:
          description: Table title
          type: string
        description:
          description: "Optional widget description. When present, Metoro displays\
            \ it as an info tooltip next to the widget title."
          type: string
        expression:
          $ref: "#/components/schemas/TableWidget_expression"
        displaySettings:
          $ref: "#/components/schemas/TableDisplaySettings"
        valuePrecision:
          description: Number of decimal places for numeric values
          format: int64
          type: integer
        unitOverride:
          description: Unit to use when formatting numeric values
          type: string
        showRawValues:
          description: "When true, display full unabbreviated values with thousands\
            \ separators instead of compact abbreviations"
          type: boolean
      type: object
    TableWidget_expression:
      description: Query expression for table data
      example:
        queryMode: promql
        reduceAggregation: lastNotNull
        promQLQueries:
        - query: sum(container_cpu_usage_seconds_total) by (pod)
          bucketSize: 60
      properties:
        queryMode:
          description: "Query mode used by the table expression. When omitted, Metoro\
            \ infers the mode from the populated query arrays."
          enum:
          - standard
          - metoroql
          - promql
          type: string
        metoroQLQueries:
          description: Array of MetoroQL queries. Each returned series becomes one
            table row after reduction.
          items:
            $ref: "#/components/schemas/MetoroQLQuery"
          type: array
        promQLQueries:
          description: Array of PromQL queries. Each returned instant vector sample
            becomes one table row.
          items:
            $ref: "#/components/schemas/PromQLQuery"
          type: array
        reduceAggregation:
          description: Aggregation method used to reduce each series into one table
            value
          enum:
          - max
          - min
          - avg
          - sum
          - count
          - last
          - lastNotNull
          type: string
      required:
      - reduceAggregation
      type: object
    TableDisplaySettings:
      description: Display settings for table widget
      example:
        showHeader: true
        enablePagination: true
        minColumnWidth: 120
        defaultColumnWidth: 180
        cellHeight: medium
        wrapText: false
        wrapHeaderText: false
        frozenColumns: 1
        columnSettings:
        - column: attributes.service.name
          title: Service
          width: 220
          alignment: left
          isFilterable: true
        - column: value
          title: Requests
          alignment: right
      properties:
        showHeader:
          default: true
          description: Whether to show table column headers
          type: boolean
        enablePagination:
          default: true
          description: Whether to paginate table rows
          type: boolean
        minColumnWidth:
          description: Minimum column width in pixels
          format: int64
          type: integer
        defaultColumnWidth:
          description: Default column width in pixels
          format: int64
          type: integer
        cellHeight:
          description: Cell height preset
          enum:
          - small
          - medium
          - large
          type: string
        wrapText:
          description: Whether to wrap table cell text
          type: boolean
        wrapHeaderText:
          description: Whether to wrap table header text
          type: boolean
        frozenColumns:
          description: Number of columns to freeze from the left
          format: int64
          type: integer
        columnSettings:
          description: Settings for individual columns
          items:
            $ref: "#/components/schemas/ColumnVisualSetting"
          type: array
      type: object
    GaugeWidget:
      description: Widget for displaying gauge metrics
      example:
        expression:
          reduceAggregation: max
          metoroQLQuery:
            query: query
            bucketSize: 5
        displaySettings:
          globalSettings:
            valuePrecision: 9
            min: 0
            max: 100
            label: Gauge Label
        title: title
        description: Percentage of the gauge range used by the current value
      properties:
        title:
          description: Gauge title
          type: string
        description:
          description: "Optional widget description. When present, Metoro displays\
            \ it as an info tooltip next to the widget title."
          type: string
        expression:
          $ref: "#/components/schemas/GaugeWidget_expression"
        displaySettings:
          $ref: "#/components/schemas/GaugeDisplaySettings"
      type: object
    GaugeWidget_expression:
      description: Query expression for gauge data
      example:
        reduceAggregation: max
        metoroQLQuery:
          query: query
          bucketSize: 5
      properties:
        metoroQLQuery:
          $ref: "#/components/schemas/MetoroQLQuery"
        promQLQuery:
          $ref: "#/components/schemas/PromQLQuery"
        queryMode:
          description: "Query mode used by the gauge expression. When omitted, Metoro\
            \ infers the mode from the populated query field."
          enum:
          - standard
          - metoroql
          - promql
          type: string
        reduceAggregation:
          description: Aggregation method
          enum:
          - max
          - min
          - avg
          - sum
          - count
          type: string
      required:
      - reduceAggregation
      type: object
    GaugeDisplaySettings:
      description: Display settings for gauge widget
      example:
        globalSettings:
          valuePrecision: 9
          min: 0
          max: 100
          label: Gauge Label
      properties:
        globalSettings:
          $ref: "#/components/schemas/GaugeGlobalSettings"
      type: object
    GaugeGlobalSettings:
      description: Global display settings for gauge widget
      example:
        valuePrecision: 9
        min: 0
        max: 100
        label: Gauge Label
        showAbsoluteValue: false
        unitOverride: ms
      properties:
        valuePrecision:
          default: 0
          description: Precision for numeric values
          format: int64
          type: integer
        min:
          description: Minimum value for gauge
          format: double
          type: number
        max:
          description: Maximum value for gauge
          format: double
          type: number
        label:
          description: Label for the gauge
          type: string
        showAbsoluteValue:
          description: "When true, display raw value instead of percentage"
          type: boolean
        unitOverride:
          description: Optional unit override for the displayed value
          type: string
        showRawValues:
          description: "When true, display full unabbreviated values with thousands\
            \ separators instead of compact abbreviations"
          type: boolean
      type: object
    BarGaugeWidget:
      description: Widget for displaying aggregate metrics as proportional bars
      example:
        title: CPU by service
        description: CPU usage grouped by service and reduced to the latest value
        expression:
          reduceAggregation: lastNotNull
          metoroQLQueries:
          - query: sum(container_resources_cpu_usage_seconds_total) by (service.name)
            bucketSize: 60
        displaySettings:
          globalSettings:
            valuePrecision: 2
            min: 0
            max: 100
            unitOverride: '%'
            orientation: horizontal
            displayMode: gradient
            valueDisplay: valueColor
            namePlacement: auto
            showUnfilled: true
      properties:
        title:
          description: Bar gauge title
          type: string
        description:
          description: "Optional widget description. When present, Metoro displays\
            \ it as an info tooltip next to the widget title."
          type: string
        expression:
          $ref: "#/components/schemas/BarGaugeWidget_expression"
        displaySettings:
          $ref: "#/components/schemas/BarGaugeDisplaySettings"
      type: object
    BarGaugeWidget_expression:
      description: Query expression for bar gauge data
      example:
        reduceAggregation: lastNotNull
        metoroQLQueries:
        - query: sum(container_resources_cpu_usage_seconds_total) by (service.name)
          bucketSize: 60
      properties:
        metoroQLQueries:
          description: Array of MetoroQL queries. Each returned series becomes one
            bar after reduction.
          items:
            $ref: "#/components/schemas/MetoroQLQuery"
          type: array
        promQLQueries:
          description: Array of PromQL queries. Each returned series becomes one bar
            after reduction.
          items:
            $ref: "#/components/schemas/PromQLQuery"
          type: array
        queryMode:
          description: "Query mode used by the bar gauge expression. When omitted,\
            \ Metoro infers the mode from the populated query arrays."
          enum:
          - standard
          - metoroql
          - promql
          type: string
        reduceAggregation:
          description: Aggregation method used to reduce each series into one bar
            value
          enum:
          - max
          - min
          - avg
          - sum
          - count
          - last
          - lastNotNull
          type: string
      required:
      - reduceAggregation
      type: object
    BarGaugeDisplaySettings:
      description: Display settings for bar gauge widget
      example:
        globalSettings:
          valuePrecision: 2
          min: 0
          max: 100
          unitOverride: '%'
          orientation: horizontal
          displayMode: gradient
          valueDisplay: valueColor
          namePlacement: auto
          showUnfilled: true
      properties:
        globalSettings:
          $ref: "#/components/schemas/BarGaugeGlobalSettings"
      type: object
    BarGaugeGlobalSettings:
      description: Global display settings for bar gauge widget
      example:
        valuePrecision: 2
        min: 0
        max: 100
        unitOverride: '%'
        orientation: horizontal
        displayMode: gradient
        valueDisplay: valueColor
        namePlacement: auto
        showUnfilled: true
        sizing: auto
        minVizWidth: 0
        minVizHeight: 10
        maxVizHeight: 300
      properties:
        valuePrecision:
          default: 2
          description: Precision for numeric values
          format: int64
          type: integer
        min:
          description: Minimum value for the bar scale
          format: double
          type: number
        max:
          description: Maximum value for the bar scale
          format: double
          type: number
        unitOverride:
          description: Optional unit override for displayed values
          type: string
        orientation:
          default: auto
          description: Bar orientation
          enum:
          - auto
          - horizontal
          - vertical
          type: string
        displayMode:
          default: gradient
          description: Bar fill rendering mode
          enum:
          - gradient
          - basic
          - lcd
          type: string
        valueDisplay:
          default: valueColor
          description: How values are shown beside bars
          enum:
          - valueColor
          - textColor
          - hidden
          type: string
        namePlacement:
          default: auto
          description: Where series names are rendered
          enum:
          - auto
          - top
          - left
          - hidden
          type: string
        showUnfilled:
          default: true
          description: Whether to show the unfilled portion of each bar
          type: boolean
        sizing:
          default: auto
          description: Whether the renderer chooses bar sizes automatically
          enum:
          - auto
          - manual
          type: string
        minVizWidth:
          description: Minimum bar width in pixels when sizing is manual
          format: int64
          type: integer
        minVizHeight:
          description: Minimum bar height in pixels when sizing is manual
          format: int64
          type: integer
        maxVizHeight:
          description: Maximum bar height in pixels when sizing is manual
          format: int64
          type: integer
        showRawValues:
          description: "When true, display full unabbreviated values with thousands\
            \ separators instead of compact abbreviations"
          type: boolean
      type: object
    PieChartWidget:
      description: Widget for displaying aggregate values as pie or donut slices
      example:
        title: Request share
        description: Share of requests by service over the selected time range
        expression:
          reduceAggregation: sum
          metoroQLQueries:
          - query: sum(http_requests_total) by (service.name)
            bucketSize: 60
        displaySettings:
          pieType: donut
          radiusPercent: 80
          sort: desc
          labels:
          - name
          - percent
          legend:
            showLegend: true
            mode: table
            placement: right
            values:
            - value
            - percent
          tooltip:
            mode: all
            sort: desc
            hideZeros: true
          valuePrecision: 2
      properties:
        title:
          description: Pie chart title
          type: string
        description:
          description: "Optional widget description. When present, Metoro displays\
            \ it as an info tooltip next to the widget title."
          type: string
        expression:
          $ref: "#/components/schemas/PieChartWidget_expression"
        displaySettings:
          $ref: "#/components/schemas/PieChartDisplaySettings"
      type: object
    PieChartWidget_expression:
      description: Query expression for pie chart data
      example:
        reduceAggregation: sum
        metoroQLQueries:
        - query: sum(http_requests_total) by (service.name)
          bucketSize: 60
      properties:
        metoroQLQueries:
          description: Array of MetoroQL queries. Each returned series becomes one
            pie slice after reduction.
          items:
            $ref: "#/components/schemas/MetoroQLQuery"
          type: array
        promQLQueries:
          description: Array of PromQL queries. Each returned series becomes one pie
            slice after reduction.
          items:
            $ref: "#/components/schemas/PromQLQuery"
          type: array
        queryMode:
          description: "Query mode used by the pie chart expression. When omitted,\
            \ Metoro infers the mode from the populated query arrays."
          enum:
          - standard
          - metoroql
          - promql
          type: string
        reduceAggregation:
          description: Aggregation method used to reduce each series into one slice
            value
          enum:
          - max
          - min
          - avg
          - sum
          - count
          - last
          - lastNotNull
          type: string
      required:
      - reduceAggregation
      type: object
    PieChartDisplaySettings:
      description: Display settings for pie chart widget
      example:
        pieType: donut
        radiusPercent: 80
        sort: desc
        labels:
        - name
        - percent
        legend:
          showLegend: true
          mode: table
          placement: right
          values:
          - value
          - percent
        tooltip:
          mode: all
          sort: desc
          hideZeros: true
        valuePrecision: 2
        unitOverride: '%'
      properties:
        pieType:
          default: pie
          description: Pie visualization type
          enum:
          - pie
          - donut
          type: string
        radiusPercent:
          default: 80
          description: Outer radius as a percentage of the available chart area
          format: int64
          maximum: 100
          minimum: 1
          type: integer
        sort:
          default: desc
          description: Slice sort order
          enum:
          - none
          - asc
          - desc
          type: string
        labels:
          description: Label components to show on slices
          items:
            enum:
            - name
            - value
            - percent
            type: string
          type: array
        legend:
          $ref: "#/components/schemas/PieChartLegendSettings"
        tooltip:
          $ref: "#/components/schemas/PieChartTooltipSettings"
        valuePrecision:
          default: 2
          description: Precision for numeric values
          format: int64
          type: integer
        unitOverride:
          description: Optional unit override for displayed values
          type: string
        showRawValues:
          description: "When true, display full unabbreviated values with thousands\
            \ separators instead of compact abbreviations"
          type: boolean
      type: object
    PieChartLegendSettings:
      description: Legend settings for pie chart widget
      example:
        showLegend: true
        mode: list
        placement: bottom
        values:
        - value
        - percent
      properties:
        showLegend:
          default: true
          description: Whether to show the legend
          type: boolean
        mode:
          default: list
          description: Legend rendering mode
          enum:
          - list
          - table
          type: string
        placement:
          default: bottom
          description: Legend placement
          enum:
          - bottom
          - right
          type: string
        values:
          description: Values to include in the legend
          items:
            enum:
            - value
            - percent
            type: string
          type: array
        width:
          description: Width in pixels when the legend is placed on the right
          format: int64
          type: integer
      type: object
    PieChartTooltipSettings:
      description: Tooltip settings for pie chart widget
      example:
        mode: single
        sort: desc
        hideZeros: true
      properties:
        mode:
          default: single
          description: Tooltip mode
          enum:
          - single
          - all
          - hidden
          type: string
        sort:
          default: desc
          description: Tooltip sort order
          enum:
          - none
          - asc
          - desc
          type: string
        hideZeros:
          default: true
          description: Whether zero-value slices should be omitted from tooltips
          type: boolean
      type: object
    TraceWidget:
      description: Widget for displaying trace data
      example:
        expression:
          metoroQLQuery:
            query: "traces{service.name=\"api\"}"
            bucketSize: 5
        displaySettings:
          hideSearchBar: false
          columns:
          - time
          - traceId
          - service.name
          - status
        title: API Traces
        description: Recent traces matching the API service filter
      properties:
        title:
          description: Trace widget title
          type: string
        description:
          description: "Optional widget description. When present, Metoro displays\
            \ it as an info tooltip next to the widget title."
          type: string
        expression:
          $ref: "#/components/schemas/TraceWidget_expression"
        displaySettings:
          $ref: "#/components/schemas/TraceWidgetDisplaySettings"
      type: object
    TraceWidget_expression:
      description: Query expression for trace data
      example:
        metoroQLQuery:
          query: "traces{service.name=\"api\"}"
          bucketSize: 5
      properties:
        metoroQLQuery:
          $ref: "#/components/schemas/MetoroQLQuery"
      type: object
    TraceWidgetDisplaySettings:
      description: Display settings for trace widget
      example:
        hideSearchBar: false
        columns:
        - time
        - traceId
        - service.name
      properties:
        hideSearchBar:
          description: Whether to hide the search bar
          type: boolean
        columns:
          description: Array of column names to display
          items:
            type: string
          type: array
      type: object
    LogWidget:
      description: Widget for displaying log data
      example:
        expression:
          metoroQLQuery:
            query: "logs{level=\"error\"}"
            bucketSize: 5
        displaySettings:
          hideSearchBar: false
          columns:
          - level
          - message
          - timestamp
        title: Error Logs
        description: Error logs matching the configured query
      properties:
        title:
          description: Log widget title
          type: string
        description:
          description: "Optional widget description. When present, Metoro displays\
            \ it as an info tooltip next to the widget title."
          type: string
        expression:
          $ref: "#/components/schemas/LogWidget_expression"
        displaySettings:
          $ref: "#/components/schemas/LogWidgetDisplaySettings"
      type: object
    LogWidget_expression:
      description: Query expression for log data
      example:
        metoroQLQuery:
          query: "logs{level=\"error\"}"
          bucketSize: 5
      properties:
        metoroQLQuery:
          $ref: "#/components/schemas/MetoroQLQuery"
      type: object
    LogWidgetDisplaySettings:
      description: Display settings for log widget
      example:
        hideSearchBar: false
        columns:
        - level
        - message
        - timestamp
      properties:
        hideSearchBar:
          description: Whether to hide the search bar
          type: boolean
        columns:
          description: Array of column names to display
          items:
            type: string
          type: array
      type: object
    Variable:
      description: Dashboard variable for dynamic content
      example:
        defaultValue: container5
        overridable: true
        name: name
        selector:
          dynamic:
            selectorQueries:
            - avg(container_info)
            attributeKey: container.id
          static:
            options:
            - label: 1 minute
              value: 1m
      properties:
        overridable:
          default: true
          description: Whether this variable can be overridden
          type: boolean
        defaultValue:
          description: Default value for this variable
          type: string
        name:
          description: Name of the variable
          type: string
        selector:
          $ref: "#/components/schemas/Variable_selector"
      required:
      - name
      type: object
    Variable_selector:
      properties:
        dynamic:
          $ref: "#/components/schemas/DynamicVariableSelectorSettings"
        static:
          $ref: "#/components/schemas/StaticVariableSelectorSettings"
      type: object
    DynamicVariableSelectorSettings:
      description: Settings for dynamic variable value selection
      example:
        selectorQueries:
        - avg(container_info)
        attributeKey: attribute
      properties:
        selectorQueries:
          description: Array of MetoroQL query strings (should have exactly 1 element)
          items:
            type: string
          maxItems: 1
          minItems: 1
          type: array
        attributeKey:
          description: Key of the attribute to use for value selection
          type: string
      required:
      - attributeKey
      - selectorQueries
      type: object
    StaticVariableSelectorSettings:
      description: Settings for static variable value selection
      example:
        options:
        - label: 1 minute
          value: 1m
      properties:
        options:
          description: Static options available for this variable
          items:
            $ref: "#/components/schemas/StaticVariableOption"
          minItems: 1
          type: array
      required:
      - options
      type: object
    StaticVariableOption:
      description: A static variable option
      example:
        label: 1 minute
        value: 1m
      properties:
        label:
          description: Optional display label for the option
          type: string
        value:
          description: Value used when substituting the variable
          type: string
      required:
      - value
      type: object
    DashboardSettings:
      description: Dashboard-wide settings
      example:
        hideGlobalEnvironmentSelector: false
        defaultTimeRange: defaultTimeRange
        layoutVersion: 0
      properties:
        defaultTimeRange:
          description: Default time range for the dashboard
          type: string
        hideGlobalEnvironmentSelector:
          default: false
          description: Whether to hide the global environment selector
          type: boolean
        layoutVersion:
          description: Dashboard layout version. Missing means legacy v1 grid; 2 means
            24-column dense manual grid.
          enum:
          - 2
          type: integer
      type: object
    CreateUpdateDashboardResponse:
      description: Response from creating or updating a dashboard
      example:
        id: id
      properties:
        id:
          description: Unique identifier of the created/updated dashboard
          type: string
      required:
      - id
      type: object
    SyncDashboardsResponse:
      description: Response confirming the dashboard sync workflow was triggered
      example:
        message: Successfully triggered dashboard sync from Kubernetes sources
      properties:
        message:
          description: Human-readable message describing the sync status
          type: string
      required:
      - message
      type: object
    OperatorConfig:
      example:
        threshold: 5000
        operator: greaterThan
      properties:
        operator:
          $ref: "#/components/schemas/OperatorType"
        threshold:
          description: Threshold value for comparison
          format: double
          type: number
        unit:
          description: "Optional UCUM unit the threshold is expressed in. When set,\
            \ the threshold is converted into the queried metric's own unit before\
            \ evaluation, and values reported on alert fires are converted back into\
            \ this unit. Supported units: ns, us, ms, s, min, h, d, By, kBy, MBy,\
            \ GBy, TBy, KiBy, MiBy, GiBy, TiBy. If the unit is not compatible with\
            \ the metric's unit, the threshold is evaluated in the metric's base unit\
            \ and a warning is logged to the organization's log stream."
          type: string
      required:
      - operator
      - threshold
      type: object
    OperatorType:
      description: Type of comparison operator
      enum:
      - greaterThan
      - lessThan
      - greaterThanOrEqual
      - lessThanOrEqual
      - equals
      - notEquals
      type: string
    MetoroQLQuery:
      description: Query configuration for MetoroQL
      example:
        displaySettings:
          label: label
          lineSettings:
            lineDotSize: 2
            lineType: solid
            lineColour: lineColour
            lineDotColor: lineDotColor
        query: query
        bucketSize: 5
      properties:
        query:
          description: MetoroQL query string
          type: string
        bucketSize:
          default: 0
          description: Size of the time buckets in seconds (0 for auto)
          format: int64
          type: integer
        displaySettings:
          $ref: "#/components/schemas/ChartDisplaySettings"
      required:
      - query
      type: object
    ChartDisplaySettings:
      description: Display settings for chart visualization
      example:
        label: label
        lineSettings:
          lineDotSize: 2
          lineType: solid
          lineColour: lineColour
          lineDotColor: lineDotColor
      properties:
        label:
          description: Label for the metric on the legend
          type: string
        lineSettings:
          $ref: "#/components/schemas/ChartDisplaySettings_lineSettings"
        unitOverride:
          description: "if specified, this unit will be used instead of the backend-provided\
            \ unit"
          type: string
      type: object
    ChartDisplaySettings_lineSettings:
      description: Settings for line display
      example:
        lineDotSize: 2
        lineType: solid
        lineColour: lineColour
        lineDotColor: lineDotColor
      properties:
        lineType:
          default: solid
          description: Type of line
          enum:
          - solid
          - dash
          type: string
        lineColour:
          description: Color of the line
          type: string
        lineDotColor:
          description: Color of dots on the line
          type: string
        lineDotSize:
          default: 0
          description: Size of dots on the line (0 for no dots)
          format: int64
          type: integer
        areaOpacity:
          description: "Opacity of the area fill under the line, from 0 to 1"
          format: double
          maximum: 1
          minimum: 0
          type: number
        areaGradientMode:
          description: Gradient mode for the area fill
          enum:
          - none
          - opacity
          type: string
      type: object
    PromQLQuery:
      description: Query configuration for PromQL
      example:
        displaySettings:
          label: label
          lineSettings:
            lineDotSize: 2
            lineType: solid
            lineColour: lineColour
            lineDotColor: lineDotColor
        query: avg(container_net_tcp_active_connections)
        bucketSize: 60
      properties:
        query:
          description: PromQL query string
          type: string
        bucketSize:
          default: 60
          description: Size of the time buckets in seconds
          format: int64
          type: integer
        bucketMode:
          description: Whether bucketSize is fixed or resolved automatically
          enum:
          - fixed
          - auto
          type: string
        autoBucketStrategy:
          description: Automatic bucket calculation strategy
          enum:
          - metoro
          - grafana
          type: string
        grafanaIntervalFactor:
          description: Grafana target intervalFactor used when autoBucketStrategy
            is grafana
          format: double
          type: number
        grafanaMinIntervalSeconds:
          description: Grafana minimum interval in seconds used when autoBucketStrategy
            is grafana
          format: int64
          type: integer
        displaySettings:
          $ref: "#/components/schemas/ChartDisplaySettings"
      required:
      - query
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http
