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

# List alerts

> List the alerts in a project. The project is identified by the `project_id` path parameter
alone; the `x-hh-project-id` header does not participate. Supports offset pagination, an
optional status filter, and sorting (defaults to most recently created first).




## OpenAPI

````yaml https://raw.githubusercontent.com/honeyhiveai/honeyhive-openapi/main/control_plane_openapi.yaml get /v1/projects/{project_id}/alerts
openapi: 3.1.0
info:
  title: HoneyHive Control Plane API
  description: >
    Manage HoneyHive control-plane resources: projects and alerts.


    Authentication requires a fine-grained control-plane API key (values

    start with `hh_fgcp_`), sent as `Authorization: Bearer <api-key>`.

    Project API keys used with the Data Plane API will not work here. Create

    a key in the HoneyHive app under an organization's or workspace's

    **Settings → API Keys**, or see

    [Authorization](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript#authorization)

    for details.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.7.0
servers:
  - url: https://api.cp.us.honeyhive.ai
security:
  - BearerAuth: []
tags:
  - name: Alerts
    description: >
      Define and manage alerts. Alerts evaluate event metrics on a schedule and
      trigger notifications when configured thresholds are crossed.
  - name: Projects
    description: >
      Create and manage projects within a workspace. A project is the container
      for the events, datasets, evaluations, and alerts logged against it.
paths:
  /v1/projects/{project_id}/alerts:
    get:
      tags:
        - Alerts
      summary: List alerts
      description: >
        List the alerts in a project. The project is identified by the
        `project_id` path parameter

        alone; the `x-hh-project-id` header does not participate. Supports
        offset pagination, an

        optional status filter, and sorting (defaults to most recently created
        first).
      operationId: listAlerts
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            type: string
          description: The unique identifier of the project whose alerts are listed
        - in: query
          name: page
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: 1-indexed page number
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Number of alerts to return per page
        - in: query
          name: status
          required: false
          schema:
            type: string
            enum:
              - ACTIVE
              - TRIGGERED
              - PAUSED
              - RESOLVED
          description: Only return alerts in this status
        - in: query
          name: sort_by
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
              - name
              - status
              - frequency
              - last_triggered
            default: created_at
          description: Field to sort results by
        - in: query
          name: sort_order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          description: Sort order
      responses:
        '200':
          description: Alerts retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAlertsResponse'
        '400':
          description: Invalid pagination or filter parameters
components:
  schemas:
    GetAlertsResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: array
          items:
            $ref: '#/components/schemas/AlertItem'
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - success
        - data
        - pagination
      additionalProperties: false
      description: A paginated list of alerts
    AlertItem:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - ACTIVE
            - TRIGGERED
            - PAUSED
            - RESOLVED
        frequency:
          type: string
          enum:
            - HOURLY
            - DAILY
            - WEEKLY
            - MONTHLY
        minimum_sample_size:
          type: integer
        alert_type:
          type: string
          enum:
            - DRIFT
            - AGGREGATE
            - PER_EVENT
        aggregation:
          type: string
        event_filters:
          type: array
          items:
            $ref: '#/components/schemas/AlertEventFilter'
        event_metrics:
          type: array
          items:
            $ref: '#/components/schemas/AlertEventMetric'
        thresholds:
          $ref: '#/components/schemas/AlertItemThresholds'
        last_run_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
            - type: 'null'
        last_result:
          type:
            - object
            - 'null'
          properties:
            current_bucket_score:
              anyOf:
                - type: number
                - type: boolean
            previous_bucket_score:
              anyOf:
                - type: number
                - type: boolean
            last_triggered_baseline:
              anyOf:
                - type: number
                - type: boolean
            drift_percentage:
              type: number
            thresholds:
              $ref: '#/components/schemas/AlertItemLastResultThresholds'
            event_filters:
              type: array
              items: {}
            event_metrics:
              type: array
              items: {}
            aggregation:
              type: string
          additionalProperties: {}
        trigger_error:
          type:
            - string
            - 'null'
        is_active:
          type: boolean
        is_muted:
          type: boolean
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
            - type: 'null'
        last_trigger_id:
          type:
            - string
            - 'null'
        scope_type:
          type: string
        scope_id:
          type: string
        created_by:
          type:
            - string
            - 'null'
        last_trigger:
          $ref: '#/components/schemas/AlertTrigger'
        triggers:
          type: array
          items:
            $ref: '#/components/schemas/AlertTrigger'
        notifications:
          type: array
          items:
            $ref: '#/components/schemas/AlertNotification'
      required:
        - id
        - name
        - status
        - frequency
        - minimum_sample_size
        - alert_type
        - aggregation
        - event_filters
        - event_metrics
        - thresholds
        - is_active
        - is_muted
        - created_at
        - scope_type
        - scope_id
      additionalProperties: false
      description: Alert object
    Pagination:
      type: object
      properties:
        page:
          type: integer
          minimum: 1
        limit:
          type: integer
          minimum: 1
        total:
          type: integer
          minimum: 0
        total_unfiltered:
          type: integer
          minimum: 0
        total_pages:
          type: integer
          minimum: 0
        has_next:
          type: boolean
        has_prev:
          type: boolean
      required:
        - page
        - limit
        - total
        - total_unfiltered
        - total_pages
        - has_next
        - has_prev
    AlertEventFilter:
      type: object
      properties:
        filter:
          $ref: '#/components/schemas/SingleFilter'
        type:
          type: string
          enum:
            - float
            - numeric
            - boolean
            - string
            - 'null'
      required:
        - filter
        - type
      additionalProperties: false
    AlertEventMetric:
      type: object
      properties:
        projection:
          type: string
          description: Projected field or metric for this entry
        type:
          type: string
          enum:
            - float
            - numeric
            - boolean
            - string
            - 'null'
      required:
        - projection
        - type
      additionalProperties: false
    AlertItemThresholds:
      type: object
      properties:
        critical:
          $ref: '#/components/schemas/AlertItemThresholdsCritical'
        resolved:
          $ref: '#/components/schemas/AlertItemThresholdsResolved'
      required:
        - critical
        - resolved
      additionalProperties: false
    AlertItemLastResultThresholds:
      type: object
      properties:
        critical:
          $ref: '#/components/schemas/AlertItemLastResultThresholdsCritical'
        resolved:
          $ref: '#/components/schemas/AlertItemLastResultThresholdsResolved'
      required:
        - critical
        - resolved
      additionalProperties: false
    AlertTrigger:
      type: object
      properties:
        id:
          type: string
        alert_id:
          type: string
        result:
          $ref: '#/components/schemas/AlertTriggerResult'
        muted:
          type: boolean
        notification_sent:
          type: boolean
        triggered_time:
          anyOf:
            - type: string
              format: date-time
            - type: string
        resolved_time:
          anyOf:
            - type: string
              format: date-time
            - type: string
            - type: 'null'
        resolved_by:
          type:
            - string
            - 'null'
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
      required:
        - id
        - alert_id
        - result
        - muted
        - notification_sent
        - triggered_time
        - resolved_time
        - resolved_by
        - created_at
        - updated_at
      additionalProperties: false
    AlertNotification:
      type: object
      properties:
        id:
          type: string
        alert_id:
          type: string
        stage:
          type: string
          enum:
            - CRITICAL
            - RESOLUTION
        channel:
          type: string
          enum:
            - EMAIL
            - SLACK
            - WEBHOOK
        scope:
          type: string
          enum:
            - ALL_PROJECT_MEMBERS
            - SPECIFIC_MEMBER
        membership_id:
          type:
            - string
            - 'null'
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: {}
        last_sent_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
            - type: 'null'
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
        membership:
          type:
            - object
            - 'null'
          properties:
            user:
              $ref: '#/components/schemas/AlertNotificationMembershipUser'
          required:
            - user
          additionalProperties: false
      required:
        - id
        - alert_id
        - stage
        - channel
        - scope
        - created_at
      additionalProperties: false
    SingleFilter:
      type: object
      properties:
        field:
          type: string
        operator:
          type: string
          enum:
            - exists
            - not exists
            - is
            - is not
            - contains
            - not contains
            - greater than
            - less than
            - after
            - before
        value:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - type: 'null'
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - datetime
      required:
        - field
        - operator
        - value
        - type
    AlertItemThresholdsCritical:
      type: object
      properties:
        operator:
          type: string
          enum:
            - greater_than
            - less_than
            - equal_to
        value:
          type: number
      required:
        - operator
        - value
      additionalProperties: false
    AlertItemThresholdsResolved:
      type: object
      properties:
        operator:
          type: string
          enum:
            - greater_than
            - less_than
            - equal_to
        value:
          type: number
      required:
        - operator
        - value
      additionalProperties: false
    AlertItemLastResultThresholdsCritical:
      type: object
      properties:
        operator:
          type: string
          enum:
            - greater_than
            - less_than
            - equal_to
        value:
          type: number
      required:
        - operator
        - value
      additionalProperties: false
    AlertItemLastResultThresholdsResolved:
      type: object
      properties:
        operator:
          type: string
          enum:
            - greater_than
            - less_than
            - equal_to
        value:
          type: number
      required:
        - operator
        - value
      additionalProperties: false
    AlertTriggerResult:
      type: object
      properties:
        current_bucket_score:
          anyOf:
            - type: number
            - type: boolean
        previous_bucket_score:
          anyOf:
            - type: number
            - type: boolean
        last_triggered_baseline:
          anyOf:
            - type: number
            - type: boolean
        drift_percentage:
          type: number
        thresholds:
          $ref: '#/components/schemas/AlertTriggerResultThresholds'
        event_filters:
          type: array
          items: {}
        event_metrics:
          type: array
          items: {}
        aggregation:
          type: string
      additionalProperties: {}
    AlertNotificationMembershipUser:
      type: object
      properties:
        id:
          type: string
      required:
        - id
      additionalProperties: false
    AlertTriggerResultThresholds:
      type: object
      properties:
        critical:
          $ref: '#/components/schemas/AlertTriggerResultThresholdsCritical'
        resolved:
          $ref: '#/components/schemas/AlertTriggerResultThresholdsResolved'
      required:
        - critical
        - resolved
      additionalProperties: false
    AlertTriggerResultThresholdsCritical:
      type: object
      properties:
        operator:
          type: string
          enum:
            - greater_than
            - less_than
            - equal_to
        value:
          type: number
      required:
        - operator
        - value
      additionalProperties: false
    AlertTriggerResultThresholdsResolved:
      type: object
      properties:
        operator:
          type: string
          enum:
            - greater_than
            - less_than
            - equal_to
        value:
          type: number
      required:
        - operator
        - value
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````