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

# List alert rules

> Retrieve all alert rules for a specific organization



## OpenAPI

````yaml /api-reference/openapi.yaml get /organization/{organizationId}/alert-rules
openapi: 3.0.0
info:
  version: 1.0.4
  title: Qovery API
  description: >
    - Qovery is the fastest way to deploy your full-stack apps on any Cloud
    provider.

    - ℹ️ The API is stable and still in development.
  contact:
    name: Qovery Product Team
    url: https://www.qovery.com
    email: support+api+documentation@qovery.com
  x-logo:
    url: https://console.qovery.com/assets/logos/logo-white.svg
    altText: Qovery
servers:
  - url: https://api.qovery.com
security:
  - bearerAuth: []
  - ApiKeyAuth: []
tags:
  - name: Account
  - name: Account Info
  - name: Alert Receivers
  - name: Alert Rules
  - name: Admin
  - name: ArgoCD
  - name: Application
  - name: Application Actions
  - name: Application Configuration
  - name: Application Database
  - name: Application Deployment Restriction
  - name: Application Deployment History
  - name: Application Environment Variable
  - name: Application Logs
  - name: Application Main Calls
  - name: Application Secret
  - name: Application Annotations Group
  - name: Applications
  - name: AutoscalingPolicy
  - name: Container
  - name: Container Actions
  - name: Container Configuration
  - name: Container Database
  - name: Container Deployment History
  - name: Container Environment Variable
  - name: Container Logs
  - name: Container Main Calls
  - name: Container Registry
  - name: Container Secret
  - name: Container Annotations Group
  - name: Containers
  - name: Deployment Stage Main Calls
  - name: Job
  - name: Job Actions
  - name: Job Configuration
  - name: Job Database
  - name: Job Deployment Restriction
  - name: Job Deployment History
  - name: Job Environment Variable
  - name: Job Logs
  - name: Job Main Calls
  - name: Job Registry
  - name: Job Secret
  - name: Job Annotations Group
  - name: Jobs
  - name: KedaTriggerAuthentication
  - name: Helm
  - name: Helm Actions
  - name: Helm Configuration
  - name: Helm Database
  - name: Helm Deployment Restriction
  - name: Helm Deployment History
  - name: Helm Logs
  - name: Helm Main Calls
  - name: Helm Repository
  - name: Helms
  - name: Backups
  - name: Billing
  - name: Cloud Provider
  - name: Cloud Provider Credentials
  - name: Clusters
  - name: Custom Domain
  - name: Container Custom Domain
  - name: Database
  - name: Database Actions
  - name: Database Application
  - name: Database Container
  - name: Database Deployment History
  - name: Database Main Calls
  - name: Database Annotations Group
  - name: Databases
  - name: Environment
  - name: Environment Actions
  - name: Environment Deployment History
  - name: Environment Deployment Rule
  - name: Environment Logs
  - name: Environment Main Calls
  - name: Environment Secret
  - name: Environment Variable
  - name: Environments
  - name: Git
  - name: Github App
  - name: Git repositories
  - name: Members
  - name: Organization
  - name: Organization Account Git Repositories
  - name: Organization Cluster Lock
  - name: Organization Main Calls
  - name: Organization Custom Role
  - name: Organization Event
  - name: Organization Api Token
  - name: Organization Webhook
  - name: Organization Annotations Group
  - name: Organization Labels Group
  - name: Organization Enterprise Connection
  - name: Project
  - name: Project Deployment Rule
  - name: Project Environment Variable
  - name: Project Main Calls
  - name: Project Secret
  - name: Projects
  - name: Referral & Rewards
  - name: Secret Manager Access
  - name: Terraforms
  - name: Terraform Main Calls
  - name: Terraform Resources
  - name: Terraform Deployment History
  - name: Terraform Deployment Restriction
  - name: Container Registries
  - name: Helm Repositories
  - name: User Sign Up
  - name: Variable Main Calls
  - name: Helm Custom Domain
  - name: Lifecycle Template Main Calls
paths:
  /organization/{organizationId}/alert-rules:
    parameters:
      - $ref: '#/components/parameters/organizationId'
    get:
      tags:
        - Alert Rules
      summary: List alert rules
      description: Retrieve all alert rules for a specific organization
      operationId: getAlertRules
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertRuleList'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
components:
  parameters:
    organizationId:
      name: organizationId
      in: path
      description: Organization ID
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    AlertRuleList:
      title: AlertRuleList
      x-stoplight:
        id: hawsqfl98nqlz
      type: object
      required:
        - results
      properties:
        results:
          type: array
          x-stoplight:
            id: nsk4tfkil7yuf
          items:
            oneOf:
              - $ref: '#/components/schemas/AlertRuleResponse'
              - $ref: '#/components/schemas/GhostAlertRuleResponse'
            discriminator:
              propertyName: source
              mapping:
                MANAGED:
                  $ref: '#/components/schemas/AlertRuleResponse'
                GHOST:
                  $ref: '#/components/schemas/GhostAlertRuleResponse'
    AlertRuleResponse:
      title: AlertRuleResponse
      x-stoplight:
        id: jsi9jy70651hv
      allOf:
        - $ref: '#/components/schemas/Base'
        - $ref: '#/components/schemas/AlertRuleResponseBase'
        - type: object
          required:
            - organization_id
            - cluster_id
            - description
            - tag
            - condition
            - for_duration
            - severity
            - enabled
            - alert_receiver_ids
            - presentation
            - target
            - is_up_to_date
          properties:
            organization_id:
              type: string
              x-stoplight:
                id: 40agisyi9s6no
              format: uuid
              description: Organization identifier
            cluster_id:
              type: string
              x-stoplight:
                id: nd3oz9h1qpa6w
              description: ' Cluster identifier'
              format: uuid
            description:
              type: string
              x-stoplight:
                id: r728dl0e8ef6x
              description: Description of what the alert monitors
            tag:
              type: string
              x-stoplight:
                id: kloew25gqdxqt
            condition:
              $ref: '#/components/schemas/AlertRuleCondition'
            for_duration:
              type: string
              x-stoplight:
                id: 3aceb4kbdv4pz
              format: duration
              description: >-
                Duration the condition must be true before firing (ISO-8601
                duration format)
            severity:
              $ref: '#/components/schemas/AlertSeverity'
            enabled:
              type: boolean
              x-stoplight:
                id: du2v3ss6fb66f
              description: Whether the alert rule is enabled
            alert_receiver_ids:
              type: array
              x-stoplight:
                id: 7lerayyele2ss
              description: List of alert receiver IDs to send notifications to
              items:
                x-stoplight:
                  id: xdka1kakao7s0
                type: string
                format: uuid
            presentation:
              $ref: '#/components/schemas/AlertPresentationResponse'
            target:
              $ref: '#/components/schemas/AlertTarget'
            is_up_to_date:
              type: boolean
              x-stoplight:
                id: 4nfaupf2l1668
              description: >-
                Indicates whether the current version of the alert has been
                synced with the alerting system.

                If false, an outdated version is currently deployed.
            starts_at:
              type: string
              x-stoplight:
                id: 9r76f8pipu6y5
              description: when the alert starts firing
              format: date-time
    GhostAlertRuleResponse:
      title: GhostAlertRuleResponse
      x-stoplight:
        id: ghost_alert_rule_response
      description: >-
        Response for ghost alerts that exist in Prometheus but have been deleted
        from the database
      allOf:
        - $ref: '#/components/schemas/AlertRuleResponseBase'
        - type: object
          properties:
            target:
              allOf:
                - $ref: '#/components/schemas/AlertTarget'
                - nullable: true
              description: May be null if target info couldn't be extracted from Prometheus
            starts_at:
              type: string
              x-stoplight:
                id: ghost_starts_at
              description: When the ghost alert started firing
              format: date-time
              nullable: true
    Base:
      type: object
      required:
        - id
        - created_at
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    AlertRuleResponseBase:
      title: AlertRuleResponseBase
      x-stoplight:
        id: alert_rule_response_base
      description: Base schema for alert rule responses with discriminator
      type: object
      required:
        - source
        - name
        - state
      properties:
        source:
          $ref: '#/components/schemas/AlertRuleSource'
        name:
          type: string
          x-stoplight:
            id: base_name_prop
          description: Name of the alert rule
        state:
          $ref: '#/components/schemas/AlertRuleState'
      discriminator:
        propertyName: source
        mapping:
          MANAGED:
            $ref: '#/components/schemas/AlertRuleResponse'
          GHOST:
            $ref: '#/components/schemas/GhostAlertRuleResponse'
    AlertRuleCondition:
      title: AlertRuleCondition
      x-stoplight:
        id: x5o1gdqlpoyei
      type: object
      required:
        - kind
        - promql
      properties:
        kind:
          $ref: '#/components/schemas/AlertRuleConditionKind'
        operator:
          $ref: '#/components/schemas/AlertRuleConditionOperator'
        threshold:
          type: number
          x-stoplight:
            id: ua0w1t89vrl0b
        function:
          $ref: '#/components/schemas/AlertRuleConditionFunction'
        promql:
          type: string
          x-stoplight:
            id: 6xaesnuka2c2q
    AlertSeverity:
      title: AlertSeverity
      x-stoplight:
        id: 74rrc7nvxpc30
      description: |-
        Alert severity level:
                - LOW: Minor issues or informational alerts that don't require immediate attention. Can be addressed during normal business hours.
                - MEDIUM: Moderate issues that should be investigated soon but don't impact critical services. May cause degraded performance or minor service disruption.
                - HIGH: Serious issues affecting service quality or availability. Requires prompt attention and resolution within hours.
                - CRITICAL: Critical issue requiring immediate action. Service outage, data loss risk, or severe performance degradation affecting users.
      enum:
        - LOW
        - MEDIUM
        - HIGH
        - CRITICAL
    AlertPresentationResponse:
      title: AlertPresentationResponse
      x-stoplight:
        id: dx514vxebudw0
      type: object
      properties:
        summary:
          type: string
          x-stoplight:
            id: z5t89ub093022
          description: ' Alert summary template'
          nullable: true
        runbook_url:
          type: string
          x-stoplight:
            id: kf94o17fes7zl
          description: URL to runbook with remediation steps
          format: uri
          nullable: true
    AlertTarget:
      title: AlertTarget
      x-stoplight:
        id: rv11vyq7cy4dn
      type: object
      required:
        - target_type
        - target_id
      properties:
        target_type:
          $ref: '#/components/schemas/AlertTargetType'
        target_id:
          type: string
          x-stoplight:
            id: 8begp36fsknxq
          format: uuid
        service:
          $ref: '#/components/schemas/ServiceLightResponse'
          description: >-
            Service details when target_type is APPLICATION, CONTAINER, JOB,
            CRONJOB, HELM or TERRAFORM
    AlertRuleSource:
      title: AlertRuleSource
      x-stoplight:
        id: alert_rule_source_enum
      description: >-
        Source of the alert rule:

        - MANAGED: Alert rule created and managed through the Qovery API

        - GHOST: Alert rule that exists in Prometheus but has been deleted from
        the database
      enum:
        - MANAGED
        - GHOST
    AlertRuleState:
      title: AlertRuleState
      x-stoplight:
        id: 05u4rv9rrfvcp
      enum:
        - UNDEPLOYED
        - OK
        - TRIGGERED
        - PENDING_NOTIFICATION
        - NOTIFIED
        - SUPPRESSED
        - UNROUTED
    AlertRuleConditionKind:
      title: AlertRuleConditionKind
      x-stoplight:
        id: 275ykwbxqzr24
      enum:
        - CUSTOM
        - BUILT
    AlertRuleConditionOperator:
      title: AlertRuleConditionOperator
      x-stoplight:
        id: hpxq0ysquqnts
      enum:
        - NONE
        - ABOVE
        - BELOW
        - ABOVE_OR_EQUAL
        - BELOW_OR_EQUAL
        - EQUAL
    AlertRuleConditionFunction:
      title: AlertRuleConditionFunction
      x-stoplight:
        id: 7tp2xk2ehojvz
      enum:
        - NONE
        - AVG
        - MAX
        - MIN
        - SUM
        - COUNT
    AlertTargetType:
      title: AlertTargetType
      x-stoplight:
        id: y45ivkwhr7wb4
      enum:
        - ' CLUSTER'
        - ENVIRONMENT
        - APPLICATION
        - CONTAINER
        - JOB
        - CRONJOB
        - HELM
        - TERRAFORM
      description: The target of an alert
    ServiceLightResponse:
      title: ServiceLightResponse
      x-stoplight:
        id: tg1rwcmait89l
      type: object
      required:
        - id
        - name
        - description
        - icon_uri
        - service_type
        - project_id
        - project_name
        - environment_id
        - environment_name
        - cluster_id
      properties:
        id:
          type: string
          x-stoplight:
            id: kusnde41nhbq0
          format: uuid
        name:
          type: string
          x-stoplight:
            id: uxr40wquz4uo4
        description:
          type: string
          x-stoplight:
            id: 71c9yrajgrd9f
        icon_uri:
          type: string
          format: uri
          x-stoplight:
            id: k6zs0jdg7k95f
        service_type:
          $ref: '#/components/schemas/ServiceTypeEnum'
        project_id:
          type: string
          x-stoplight:
            id: 6j6xz0qq65mbs
          format: uuid
        project_name:
          type: string
          x-stoplight:
            id: jfl0pof91101b
        environment_id:
          type: string
          x-stoplight:
            id: cs79bi0ic3r18
          format: uuid
        environment_name:
          type: string
          x-stoplight:
            id: s8c6hmto9njzg
        cluster_id:
          type: string
          x-stoplight:
            id: hg9qpxe5z7
          format: uuid
        job_type:
          x-stoplight:
            id: jwtmqb1fq5a6m
          enum:
            - CRON
            - LIFECYCLE
    ServiceTypeEnum:
      type: string
      x-stoplight:
        id: d66063cd29913
      description: type of the service (application, database, job, ...)
      enum:
        - APPLICATION
        - DATABASE
        - CONTAINER
        - JOB
        - HELM
        - TERRAFORM
        - ARGOCD_APP
  responses:
    '401':
      description: Access token is missing or invalid
    '403':
      description: Access forbidden
    '404':
      description: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT tokens should be used with OIDC account (human to machine). JWT
        tokens used by the Qovery console to communicate with the API have a
        TTL. Curl Example ' curl https://console.qovery.com/organization -H
        "Authorization: Bearer $qovery_token" '
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Token API are generated by Qovery to manage machine to machine
        interaction and do not have a TTL. Curl Example ' curl
        https://console.qovery.com/organization -H "Authorization: Token
        $qovery_token" '

````