> ## 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 a monitor alert

> Returns one alert with what the check saw when it opened. 404 for an alert of another monitor.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json get /monitors/{monitorId}/alerts/{alertId}
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/{monitorId}/alerts/{alertId}:
    get:
      tags:
        - monitors
      summary: Get a monitor alert
      description: >-
        Returns one alert with what the check saw when it opened. 404 for an
        alert of another monitor.
      operationId: getMonitorAlert
      parameters:
        - schema:
            type: string
            description: Monitor ID
            example: monitor_123
          required: true
          description: Monitor ID
          name: monitorId
          in: path
        - schema:
            type: string
            description: Monitor alert ID
            example: monitorAlert_123
          required: true
          description: Monitor alert ID
          name: alertId
          in: path
      responses:
        '200':
          description: Alert retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorAlert'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    MonitorAlert:
      type: object
      properties:
        id:
          type: string
          example: monitorAlert_123
        monitorId:
          type: string
          example: monitor_123
        ruleId:
          type: string
          example: monitorAlertRule_123
        ruleDeletedAt:
          type: string
          nullable: true
          format: date-time
          description: Set when the rule that opened the alert was deleted
        state:
          type: string
          enum:
            - OPEN
            - CLOSED
          example: OPEN
        openedAt:
          type: string
          format: date-time
        closedAt:
          type: string
          format: date-time
          nullable: true
        closeReason:
          type: string
          nullable: true
          enum:
            - RECOVERED
            - RULE_DELETED
            - RULE_EDITED
            - RULE_PAUSED
            - null
          example: null
        window:
          type: string
          enum:
            - FIFTEEN_MINUTES
            - ONE_HOUR
            - SIX_HOURS
            - TWENTY_FOUR_HOURS
          example: ONE_HOUR
        windowStart:
          type: string
          format: date-time
          description: Start of the window the check counted when the alert opened
        windowEnd:
          type: string
          format: date-time
          description: End of that window
        metricGroupId:
          type: string
          description: The metric family the rule watches
          example: metricGroup_123
        metricId:
          type: string
          description: The metric revision the check counted
          example: metric_123
        samplingPercentage:
          type: number
          nullable: true
          description: The monitor's sampling rate
          example: 5
        threshold:
          type: number
          description: The threshold that opened the alert
          example: 10
        clearValue:
          type: number
          nullable: true
          description: >-
            The value at which an open alert closes, from the rule's current
            settings. Null when the alert is closed, its rule was deleted, or
            its rule's metric family, window or bad session score changed. After
            a threshold-only edit it holds the new clear value.
          example: 6
        observation:
          oneOf:
            - $ref: '#/components/schemas/MonitorAlertBadSessionCountObservation'
          discriminator:
            propertyName: type
            mapping:
              BAD_SESSION_COUNT: '#/components/schemas/MonitorAlertBadSessionCountObservation'
          description: >-
            What the check saw when the alert opened. The fields depend on the
            rule type.
      required:
        - id
        - monitorId
        - ruleId
        - ruleDeletedAt
        - state
        - openedAt
        - closedAt
        - closeReason
        - window
        - windowStart
        - windowEnd
        - metricGroupId
        - metricId
        - samplingPercentage
        - threshold
        - clearValue
        - observation
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
    MonitorAlertBadSessionCountObservation:
      type: object
      properties:
        type:
          type: string
          enum:
            - BAD_SESSION_COUNT
        badSessionScore:
          type: number
          description: A session counted as bad at or below this score
          example: 0.5
        badSessionCount:
          type: integer
          description: Bad sessions in the window
          example: 12
        scoredSessionCount:
          type: integer
          description: Scored sessions in the window
          example: 240
      required:
        - type
        - badSessionScore
        - badSessionCount
        - scoredSessionCount
  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-...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.