> ## 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 apiv1errorsstats

> Get error statistics



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/errors/stats
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/errors/stats:
    get:
      tags:
        - Errors
      description: Get error statistics
      operationId: ErrorsApi_getStats
      parameters:
        - name: serviceName
          in: query
          required: false
          description: Service name filter
          schema:
            type: string
          explode: false
        - name: startTime
          in: query
          required: false
          description: Start time
          schema:
            type: string
            format: date-time
          explode: false
        - name: endTime
          in: query
          required: false
          description: End time
          schema:
            type: string
            format: date-time
          explode: false
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Qyl.Domains.Observe.Error.ErrorStats'
        '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.Observe.Error.ErrorStats:
      type: object
      required:
        - total_count
        - unique_types
        - error_rate
        - by_category
        - top_errors
        - trend
      properties:
        total_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Total error count
        unique_types:
          type: integer
          format: int32
          description: Unique error types
        error_rate:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Ratio'
          description: Error rate
        by_category:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Domains.Observe.Error.ErrorCategoryStats'
          description: Errors by category
        by_service:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Domains.Observe.Error.ErrorServiceStats'
          description: Errors by service
        top_errors:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Domains.Observe.Error.ErrorTypeStats'
          description: Top errors
        trend:
          allOf:
            - $ref: '#/components/schemas/Qyl.Domains.Observe.Error.ErrorTrend'
          description: Trend
      description: Error statistics
    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.Common.Count:
      type: integer
      format: int64
      minimum: 0
      description: Generic non-negative counter
      x-csharp-type: long
      x-duckdb-type: BIGINT
    Qyl.Common.Ratio:
      type: number
      format: double
      minimum: 0
      maximum: 1
      description: Ratio value (0.0 to 1.0)
      x-csharp-type: double
      x-duckdb-type: DOUBLE
    Qyl.Domains.Observe.Error.ErrorCategoryStats:
      type: object
      required:
        - category
        - count
        - percentage
      properties:
        category:
          allOf:
            - $ref: '#/components/schemas/Qyl.Domains.Observe.Error.ErrorCategory'
          description: Category
        count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Count
        percentage:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Percentage'
          description: Percentage of total
      description: Error stats by category
    Qyl.Domains.Observe.Error.ErrorServiceStats:
      type: object
      required:
        - service_name
        - count
        - error_rate
        - top_error_type
      properties:
        service_name:
          type: string
          description: Service name
        count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Error count
        error_rate:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Ratio'
          description: Error rate
        top_error_type:
          type: string
          description: Top error type
      description: Error stats by service
    Qyl.Domains.Observe.Error.ErrorTypeStats:
      type: object
      required:
        - error_type
        - count
        - percentage
        - status
      properties:
        error_type:
          type: string
          description: Error type
        count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Count
        percentage:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Percentage'
          description: Percentage of total
        affected_users:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Affected users
        status:
          allOf:
            - $ref: '#/components/schemas/Qyl.Domains.Observe.Error.ErrorStatus'
          description: Status
      description: Error stats by type
    Qyl.Domains.Observe.Error.ErrorTrend:
      type: string
      enum:
        - increasing
        - decreasing
        - stable
        - spike
      description: Error trend
    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
    Qyl.Domains.Observe.Error.ErrorCategory:
      type: string
      enum:
        - client
        - server
        - network
        - timeout
        - validation
        - authentication
        - authorization
        - rate_limit
        - not_found
        - conflict
        - internal
        - external
        - database
        - configuration
        - unknown
      description: High-level error categories
    Qyl.Common.Percentage:
      type: number
      format: double
      minimum: 0
      maximum: 100
      description: Percentage value (0.0 to 100.0)
      x-csharp-type: double
      x-duckdb-type: DOUBLE
    Qyl.Domains.Observe.Error.ErrorStatus:
      type: string
      enum:
        - new
        - acknowledged
        - in_progress
        - resolved
        - ignored
        - regressed
        - wont_fix
      description: Error tracking status

````