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

# Post apiv1search

> Unified search across all entity types



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/v1/search
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/search:
    post:
      tags:
        - Search
      description: Unified search across all entity types
      operationId: SearchApi_search
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Qyl.Domains.Search.SearchRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Qyl.Domains.Search.SearchResponse'
        '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.Domains.Search.SearchRequest:
      type: object
      required:
        - query
      properties:
        query:
          type: string
          description: Search query text
        entity_types:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Domains.Search.SearchEntityType'
          description: Entity type filters
        project_id:
          type: string
          description: Project scope
        limit:
          type: integer
          format: int32
          minimum: 1
          maximum: 100
          description: Maximum results
          default: 20
        cursor:
          type: string
          description: Cursor for pagination
      description: Unified search request
    Qyl.Domains.Search.SearchResponse:
      type: object
      required:
        - results
        - total_count
        - duration_ms
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Domains.Search.SearchResult'
          description: Search results
        total_count:
          type: integer
          format: int64
          description: Total matching documents
        duration_ms:
          type: integer
          format: int32
          description: Query execution time in ms
        next_cursor:
          type: string
          description: Next page cursor
        suggestions:
          type: array
          items:
            type: string
          description: Search suggestions
      description: Unified search response
    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.Domains.Search.SearchEntityType:
      type: string
      enum:
        - span
        - log
        - issue
        - workflow
        - deployment
        - session
        - alert
        - fix
      description: Searchable entity types
    Qyl.Domains.Search.SearchResult:
      type: object
      required:
        - document_id
        - entity_type
        - entity_id
        - title
        - score
      properties:
        document_id:
          type: string
          description: Document ID
        entity_type:
          allOf:
            - $ref: '#/components/schemas/Qyl.Domains.Search.SearchEntityType'
          description: Entity type
        entity_id:
          type: string
          description: Entity ID
        title:
          type: string
          description: Result title
        snippet:
          type: string
          description: Result snippet with highlights
        score:
          type: number
          format: double
          description: Relevance score
        url:
          type: string
          description: Link to entity
      description: Individual search result
    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

````