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

# Get monitor results

> Aggregated results for a monitor over a trailing window (default 7 days, bucketed by day): per-metric-family sampling-weighted score series with 95% confidence intervals, the worst metric family, metric-revision and sampling-change markers, current-cycle credit spend, and the scored/waiting session listing. Below 30 scored sessions a bucket reports a collecting-data state instead of an interval. Computed only from the monitor's own evaluations.




## OpenAPI

````yaml https://api.galtea.ai/openapi.json get /monitors/{id}/results
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /monitors/{id}/results:
    get:
      tags:
        - monitors
      summary: Get monitor results
      description: >
        Aggregated results for a monitor over a trailing window (default 7 days,
        bucketed by day): per-metric-family sampling-weighted score series with
        95% confidence intervals, the worst metric family, metric-revision and
        sampling-change markers, current-cycle credit spend, and the
        scored/waiting session listing. Below 30 scored sessions a bucket
        reports a collecting-data state instead of an interval. Computed only
        from the monitor's own evaluations.
      operationId: getMonitorResults
      parameters:
        - name: id
          in: path
          description: Monitor ID
          required: true
          schema:
            type: string
        - name: days
          in: query
          description: Trailing window in days to aggregate (default 7, max 90).
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 90
      responses:
        '200':
          description: Monitor results retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorResults'
        '400':
          description: Invalid query parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The monitor belongs to another organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Monitor not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    MonitorResults:
      type: object
      description: >-
        Aggregated results for a monitor over a trailing window, computed only
        from the monitor's own evaluations.
      required:
        - monitorId
        - range
        - metrics
        - worstMetric
        - markers
        - spend
        - sessions
      properties:
        monitorId:
          type: string
          example: monitor_123
        range:
          type: object
          required:
            - from
            - to
            - bucketDays
          properties:
            from:
              type: string
              format: date-time
            to:
              type: string
              format: date-time
            bucketDays:
              type: integer
              example: 1
        metrics:
          type: array
          description: One score series per bound metric family.
          items:
            type: object
            required:
              - metricGroupId
              - name
              - headline
              - buckets
            properties:
              metricGroupId:
                type: string
                example: metricGroup_123
              name:
                type: string
                example: Accuracy
              headline:
                $ref: '#/components/schemas/MonitorScorePoint'
              buckets:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/MonitorScorePoint'
                    - type: object
                      required:
                        - bucket
                      properties:
                        bucket:
                          type: string
                          format: date-time
        worstMetric:
          type: object
          nullable: true
          description: >-
            Lowest-scoring metric family over the range. Never an average across
            metrics.
          allOf:
            - $ref: '#/components/schemas/MonitorScorePoint'
            - type: object
              required:
                - metricGroupId
                - name
              properties:
                metricGroupId:
                  type: string
                  example: metricGroup_123
                name:
                  type: string
                  example: Custom judge
        markers:
          type: object
          required:
            - metricRevisions
            - samplingChanges
          properties:
            metricRevisions:
              type: array
              items:
                type: object
                required:
                  - metricGroupId
                  - name
                  - metricId
                  - at
                properties:
                  metricGroupId:
                    type: string
                  name:
                    type: string
                  metricId:
                    type: string
                  at:
                    type: string
                    format: date-time
            samplingChanges:
              type: array
              items:
                type: object
                required:
                  - at
                  - samplingPercentage
                properties:
                  at:
                    type: string
                    format: date-time
                  samplingPercentage:
                    type: number
                    example: 10
        spend:
          type: object
          required:
            - spentCredits
            - pendingCredits
            - capCredits
            - cycleStart
          properties:
            spentCredits:
              type: integer
              example: 240
            pendingCredits:
              type: integer
              example: 12
            capCredits:
              type: integer
              nullable: true
              example: 500
            cycleStart:
              type: string
              format: date-time
              nullable: true
        sessions:
          type: object
          required:
            - scored
            - waiting
          properties:
            scored:
              type: array
              description: Scored sessions, most-recent first (capped at 200).
              items:
                type: object
                required:
                  - sessionId
                  - evaluatedAt
                  - settleReason
                  - settledAtTurn
                  - description
                properties:
                  sessionId:
                    type: string
                  evaluatedAt:
                    type: string
                    format: date-time
                  settleReason:
                    type: string
                    nullable: true
                    enum:
                      - EXPLICIT_END
                      - INACTIVITY
                  settledAtTurn:
                    type: integer
                    nullable: true
                  description:
                    type: string
                    example: 'Evaluated at turn 6: inactivity window'
            waiting:
              type: array
              description: >-
                Production sessions attached to the monitor not yet settled
                (capped at 100).
              items:
                type: object
                required:
                  - sessionId
                  - lastTurnAt
                  - minutesSinceLastTurn
                  - settlesAt
                  - description
                properties:
                  sessionId:
                    type: string
                  lastTurnAt:
                    type: string
                    format: date-time
                  minutesSinceLastTurn:
                    type: integer
                    example: 2
                  settlesAt:
                    type: string
                    format: date-time
                  description:
                    type: string
                    example: 'Waiting: last turn 2 min ago, settles at 5 min'
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
    MonitorScorePoint:
      type: object
      description: >-
        Sampling-weighted score over a set of scored sessions. Below 30 scored
        sessions confidenceInterval is null and collectingData is true; score
        stays the point estimate (null only when nothing scored).
      required:
        - scoredSessions
        - score
        - confidenceInterval
        - collectingData
      properties:
        scoredSessions:
          type: integer
          example: 42
        score:
          type: number
          nullable: true
          description: Weighted mean score (0-1).
          example: 0.73
        confidenceInterval:
          type: object
          nullable: true
          description: 95% confidence interval, present only at 30 or more scored sessions.
          required:
            - lower
            - upper
          properties:
            lower:
              type: number
              example: 0.68
            upper:
              type: number
              example: 0.78
        collectingData:
          type: boolean
          example: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````