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

> Query logs with filtering and pagination



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/logs
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/logs:
    get:
      tags:
        - Logs
      description: Query logs with filtering and pagination
      operationId: LogsApi_list
      parameters:
        - name: serviceName
          in: query
          required: false
          description: Service name filter
          schema:
            type: string
          explode: false
        - name: severityMin
          in: query
          required: false
          description: Minimum severity
          schema:
            $ref: '#/components/schemas/Qyl.OTel.Enums.SeverityNumber'
          explode: false
        - name: severityMax
          in: query
          required: false
          description: Maximum severity
          schema:
            $ref: '#/components/schemas/Qyl.OTel.Enums.SeverityNumber'
          explode: false
        - name: traceId
          in: query
          required: false
          description: Trace ID filter
          schema:
            $ref: '#/components/schemas/Qyl.Common.TraceId'
          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
        - name: query
          in: query
          required: false
          description: Free text search
          schema:
            type: string
          explode: false
        - name: limit
          in: query
          required: false
          description: Page size
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 10000
            default: 100
          explode: false
        - name: cursor
          in: query
          required: false
          description: Cursor
          schema:
            type: string
          explode: false
        - name: orderBy
          in: query
          required: false
          description: Order
          schema:
            $ref: '#/components/schemas/Qyl.Domains.Observe.Log.LogOrderBy'
          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.OTel.Logs.LogRecord'
                    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
        '400':
          description: Bad request - validation failed (400)
          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.ValidationError'
        '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.OTel.Enums.SeverityNumber:
      type: number
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
        - 18
        - 19
        - 20
        - 21
        - 22
        - 23
        - 24
      description: Log severity number following OTel specification (1-24)
    Qyl.Common.TraceId:
      type: string
      minLength: 32
      maxLength: 32
      pattern: ^[a-f0-9]{32}$
      description: Unique trace identifier (32 lowercase hex characters)
      example: 0af7651916cd43dd8448eb211c80319c
      x-csharp-type: TraceId
      x-csharp-struct: true
      x-duckdb-type: VARCHAR(32)
    Qyl.Domains.Observe.Log.LogOrderBy:
      type: string
      enum:
        - timestamp_asc
        - timestamp_desc
        - severity_asc
        - severity_desc
      description: Log ordering options
    Qyl.OTel.Logs.LogRecord:
      type: object
      required:
        - time_unix_nano
        - observed_time_unix_nano
        - severity_number
        - body
        - resource
      properties:
        time_unix_nano:
          type: integer
          format: int64
          description: Timestamp when the event occurred (nanoseconds since epoch)
        observed_time_unix_nano:
          type: integer
          format: int64
          description: >-
            Timestamp when the log was observed/collected (nanoseconds since
            epoch)
        severity_number:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Enums.SeverityNumber'
          description: Severity number (1-24)
        severity_text:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Enums.SeverityText'
          description: Severity text (DEBUG, INFO, WARN, ERROR, etc.)
        body:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Logs.LogBody'
          description: Log body - the main content
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Attribute'
          description: Log attributes
        dropped_attributes_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped attributes count
        flags:
          type: integer
          format: int32
          description: Flags (trace flags)
        trace_id:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.TraceId'
          description: Associated trace ID
        span_id:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SpanId'
          description: Associated span ID
        resource:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Resource.Resource'
          description: Resource describing the entity that produced this log
        instrumentation_scope:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.InstrumentationScope'
          description: Instrumentation scope
      description: OpenTelemetry Log Record
      x-csharp-type: LogStorageRow
      x-duckdb-table: logs
    Qyl.Common.Errors.ValidationError:
      type: object
      required:
        - title
        - errors
      properties:
        title:
          type: string
          enum:
            - Validation Failed
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Errors.ValidationErrorDetail'
          description: List of validation errors
      allOf:
        - $ref: '#/components/schemas/Qyl.Common.Errors.ProblemDetails'
      description: Bad request - validation failed (400)
    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.OTel.Enums.SeverityText:
      type: string
      enum:
        - TRACE
        - DEBUG
        - INFO
        - WARN
        - ERROR
        - FATAL
      description: Log severity text (human-readable)
    Qyl.OTel.Logs.LogBody:
      type: object
      oneOf:
        - $ref: '#/components/schemas/Qyl.OTel.Logs.LogBodyString'
        - $ref: '#/components/schemas/Qyl.OTel.Logs.LogBodyKvList'
        - $ref: '#/components/schemas/Qyl.OTel.Logs.LogBodyArray'
        - $ref: '#/components/schemas/Qyl.OTel.Logs.LogBodyBytes'
      discriminator:
        propertyName: kind
        mapping:
          stringBody:
            $ref: '#/components/schemas/Qyl.OTel.Logs.LogBodyString'
          kvListBody:
            $ref: '#/components/schemas/Qyl.OTel.Logs.LogBodyKvList'
          arrayBody:
            $ref: '#/components/schemas/Qyl.OTel.Logs.LogBodyArray'
          bytesBody:
            $ref: '#/components/schemas/Qyl.OTel.Logs.LogBodyBytes'
      description: Log body content - can be string, structured, or bytes
    Qyl.Common.Attribute:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
          minLength: 1
          maxLength: 256
          description: Attribute key (dot-separated namespace)
        value:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.AttributeValue'
          description: Attribute value
      description: Key-value attribute pair following OTel conventions
    Qyl.Common.Count:
      type: integer
      format: int64
      minimum: 0
      description: Generic non-negative counter
      x-csharp-type: long
      x-duckdb-type: BIGINT
    Qyl.Common.SpanId:
      type: string
      minLength: 16
      maxLength: 16
      pattern: ^[a-f0-9]{16}$
      description: Unique span identifier (16 lowercase hex characters)
      example: b7ad6b7169203331
      x-csharp-type: SpanId
      x-csharp-struct: true
      x-duckdb-type: VARCHAR(16)
    Qyl.OTel.Resource.Resource:
      type: object
      required:
        - service.name
      properties:
        service.name:
          type: string
          description: Service name (required)
        service.namespace:
          type: string
          description: Service namespace for grouping
        service.instance.id:
          type: string
          description: Service instance ID (unique per instance)
        service.version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Service version
        telemetry.sdk.name:
          type: string
          description: Telemetry SDK name
        telemetry.sdk.language:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Enums.TelemetrySdkLanguage'
          description: Telemetry SDK language
        telemetry.sdk.version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Telemetry SDK version
        telemetry.auto.version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Auto-instrumentation agent name
        deployment.environment.name:
          type: string
          description: Deployment environment (e.g., production, staging)
        cloud.provider:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Resource.CloudProvider'
          description: Cloud provider
        cloud.region:
          type: string
          description: Cloud region
        cloud.availability_zone:
          type: string
          description: Cloud availability zone
        cloud.account.id:
          type: string
          description: Cloud account ID
        cloud.platform:
          type: string
          description: Cloud platform (e.g., aws_ecs, gcp_cloud_run)
        host.name:
          type: string
          description: Host name
        host.id:
          type: string
          description: Host ID
        host.type:
          type: string
          description: Host type (e.g., n1-standard-1)
        host.arch:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Resource.HostArch'
          description: Host architecture (e.g., amd64, arm64)
        os.type:
          allOf:
            - $ref: '#/components/schemas/Qyl.OTel.Resource.OsType'
          description: Operating system type
        os.description:
          type: string
          description: Operating system description
        os.version:
          type: string
          description: Operating system version
        process.pid:
          type: integer
          format: int64
          description: Process ID
        process.executable.name:
          type: string
          description: Process executable name
        process.command_line:
          type: string
          description: Process command line
        process.runtime.name:
          type: string
          description: Process runtime name
        process.runtime.version:
          type: string
          description: Process runtime version
        container.id:
          type: string
          description: Container ID
        container.name:
          type: string
          description: Container name
        container.image.name:
          type: string
          description: Container image name
        container.image.tag:
          type: string
          description: Container image tag
        k8s.cluster.name:
          type: string
          description: Kubernetes cluster name
        k8s.namespace.name:
          type: string
          description: Kubernetes namespace
        k8s.pod.name:
          type: string
          description: Kubernetes pod name
        k8s.pod.uid:
          type: string
          description: Kubernetes pod UID
        k8s.deployment.name:
          type: string
          description: Kubernetes deployment name
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Attribute'
          description: Additional resource attributes
        dropped_attributes_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped attributes count
      description: Resource describes the entity producing telemetry
    Qyl.Common.InstrumentationScope:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the instrumentation scope (library name)
        version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Version of the instrumentation scope
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Attribute'
          description: Additional attributes for the scope
        dropped_attributes_count:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.Count'
          description: Dropped attributes count
      description: >-
        Instrumentation scope identifying the library/component emitting
        telemetry
    Qyl.Common.Errors.ValidationErrorDetail:
      type: object
      required:
        - field
        - message
        - code
      properties:
        field:
          type: string
          description: The field/property that failed validation
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The validation rule that failed
        rejected_value:
          type: string
          description: The rejected value (if safe to include)
      description: Individual validation error detail
    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.OTel.Logs.LogBodyString:
      type: object
      required:
        - string_value
      properties:
        string_value:
          type: string
          description: String value
      description: String log body
    Qyl.OTel.Logs.LogBodyKvList:
      type: object
      required:
        - kv_list_value
      properties:
        kv_list_value:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Attribute'
          description: Key-value pairs
      description: Structured key-value log body
    Qyl.OTel.Logs.LogBodyArray:
      type: object
      required:
        - array_value
      properties:
        array_value:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.AttributeValue'
          description: Array of values
      description: Array log body
    Qyl.OTel.Logs.LogBodyBytes:
      type: object
      required:
        - bytes_value
      properties:
        bytes_value:
          type: string
          format: byte
          description: Binary value (base64 encoded)
      description: Binary log body
    Qyl.Common.AttributeValue:
      anyOf:
        - type: string
        - type: boolean
        - type: integer
          format: int64
        - type: number
          format: double
        - type: array
          items:
            type: string
        - type: array
          items:
            type: boolean
        - type: array
          items:
            type: integer
            format: int64
        - type: array
          items:
            type: number
            format: double
        - type: string
          format: byte
      description: Primitive attribute value types supported by OpenTelemetry
    Qyl.Common.SemVer:
      type: string
      pattern: >-
        ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
      description: Semantic version string (e.g., 1.2.3)
      example: 2.1.0
    Qyl.OTel.Enums.TelemetrySdkLanguage:
      type: string
      enum:
        - cpp
        - dotnet
        - erlang
        - go
        - java
        - nodejs
        - php
        - python
        - ruby
        - rust
        - swift
        - webjs
      description: Telemetry SDK language
    Qyl.OTel.Resource.CloudProvider:
      type: string
      enum:
        - alibaba_cloud
        - aws
        - azure
        - gcp
        - heroku
        - ibm_cloud
        - tencent_cloud
      description: Cloud provider types
    Qyl.OTel.Resource.HostArch:
      type: string
      enum:
        - amd64
        - arm32
        - arm64
        - ia64
        - ppc32
        - ppc64
        - s390x
        - x86
      description: Host architecture types
    Qyl.OTel.Resource.OsType:
      type: string
      enum:
        - windows
        - linux
        - darwin
        - freebsd
        - netbsd
        - openbsd
        - dragonflybsd
        - hpux
        - aix
        - solaris
        - z_os
      description: Operating system types

````