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

# Get apiv1alertsrules

> List alert rules



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/alerts/rules
openapi: 3.0.0
info:
  title: QYL Observability API
  version: '2026-01-26'
servers:
  - url: https://api.staging.qyl.dev
    description: QYL Staging API
    variables: {}
  - url: https://api.qyl.dev
    description: QYL Production API
    variables: {}
security: []
tags:
  - name: Streaming
  - name: Traces
  - name: Logs
  - name: Metrics
  - name: Sessions
  - name: Errors
  - name: Deployments
  - name: Services
  - name: Health
  - name: Workspaces
  - name: Onboarding
  - name: Configurator
  - name: Issues
  - name: Workflows
  - name: Search
  - name: Alerts
paths:
  /api/v1/alerts/rules:
    get:
      tags:
        - Alerts
      description: List alert rules
      operationId: AlertsApi_listRules
      parameters:
        - name: projectId
          in: query
          required: false
          description: Project ID filter
          schema:
            type: string
          explode: false
        - name: enabled
          in: query
          required: false
          description: Enabled filter
          schema:
            type: boolean
          explode: false
        - name: limit
          in: query
          required: false
          description: Page size
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100
            default: 20
          explode: false
        - name: cursor
          in: query
          required: false
          description: Cursor
          schema:
            type: string
          explode: false
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - has_more
                properties:
                  items:
                    type: array
                    items:
                      $ref: >-
                        #/components/schemas/Qyl.Domains.Alerting.AlertRuleEntity
                    description: List of items in this page
                  next_cursor:
                    type: string
                    description: Cursor for the next page (null if no more pages)
                  prev_cursor:
                    type: string
                    description: Cursor for the previous page (null if first page)
                  has_more:
                    type: boolean
                    description: Whether there are more items available
                description: Cursor-based paginated response wrapper
        '500':
          description: Internal server error (500)
          headers:
            X-Trace-Id:
              required: false
              description: Trace ID for correlation
              schema:
                type: string
            X-Request-Id:
              required: false
              description: Request ID for support
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Qyl.Common.Errors.InternalServerError'
components:
  schemas:
    Qyl.Domains.Alerting.AlertRuleEntity:
      type: object
      required:
        - id
        - project_id
        - name
        - rule_type
        - condition_json
        - target_type
        - severity
        - cooldown_seconds
        - enabled
        - trigger_count
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Rule ID
        project_id:
          type: string
          description: Owning project
        name:
          type: string
          description: Rule name
        description:
          type: string
          description: Rule description
        rule_type:
          allOf:
            - $ref: '#/components/schemas/Qyl.Domains.Alerting.AlertRuleType'
          description: Rule type
        condition_json:
          type: string
          description: Condition definition
          x-duckdb-type: JSON
        threshold_json:
          type: string
          description: Threshold definition
          x-duckdb-type: JSON
        target_type:
          type: string
          description: Target type for evaluation
        target_filter_json:
          type: string
          description: Target filter
          x-duckdb-type: JSON
        severity:
          allOf:
            - $ref: '#/components/schemas/Qyl.Domains.Alerting.AlertSeverity'
          description: Alert severity
        cooldown_seconds:
          type: integer
          format: int32
          description: Cooldown between firings in seconds
        notification_channels_json:
          type: string
          description: Notification channels
          x-duckdb-type: JSON
        enabled:
          type: boolean
          description: Whether rule is enabled
        last_triggered_at:
          type: string
          format: date-time
          description: Last trigger timestamp
        trigger_count:
          type: integer
          format: int64
          description: Total trigger count
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
      description: Alert rule definition
      x-csharp-type: AlertRuleEntity
      x-duckdb-table: alert_rules
    Qyl.Common.Errors.InternalServerError:
      type: object
      required:
        - title
      properties:
        title:
          type: string
          enum:
            - Internal Server Error
        error_code:
          type: string
          description: Error code for support reference
      allOf:
        - $ref: '#/components/schemas/Qyl.Common.Errors.ProblemDetails'
      description: Internal server error (500)
    Qyl.Domains.Alerting.AlertRuleType:
      type: string
      enum:
        - threshold
        - error_rate
        - new_issue
        - regression
        - burn_rate
        - anomaly
        - custom
      description: Alert rule types
    Qyl.Domains.Alerting.AlertSeverity:
      type: string
      enum:
        - critical
        - warning
        - info
      description: Alert severity levels
    Qyl.Common.Errors.ProblemDetails:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
          description: A URI reference identifying the problem type
          default: about:blank
        title:
          type: string
          description: A short, human-readable summary of the problem type
        status:
          type: integer
          format: int32
          description: >-
            The HTTP status code (informational only, actual code set by
            subtype)
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence
        instance:
          type: string
          format: uri
          description: A URI reference identifying the specific occurrence
        timestamp:
          type: string
          format: date-time
          description: Timestamp of the error
      description: RFC 7807 Problem Details for HTTP APIs

````