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

# Query governed KB retrieval-audit logs (incl. misses/blocks/errors)



## OpenAPI

````yaml /api-reference/openapi.json get /v1/knowledge-base/audit/retrievals
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.21.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/knowledge-base/audit/retrievals:
    get:
      tags:
        - knowledge-base-audit
      summary: Query governed KB retrieval-audit logs (incl. misses/blocks/errors)
      operationId: queryKBRetrievalAudits
      parameters:
        - name: start
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: Inclusive window start (required).
            title: Start
          description: Inclusive window start (required).
        - name: end
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: Exclusive window end (required).
            title: End
          description: Exclusive window end (required).
        - name: kb_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
            title: Kb Ids
        - name: statuses
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Statuses
        - name: actor_user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Actor User Id
        - name: session_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Session Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPage_RetrievalAuditLogSummary_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CursorPage_RetrievalAuditLogSummary_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/RetrievalAuditLogSummary'
          type: array
          title: Items
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - items
        - has_more
      title: CursorPage[RetrievalAuditLogSummary]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RetrievalAuditLogSummary:
      properties:
        ref:
          type: string
          title: Ref
          default: ''
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        retrieval_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Retrieval Status
        serving_decision:
          anyOf:
            - type: string
            - type: 'null'
          title: Serving Decision
        audit_write_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Audit Write Status
        requested_kb_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Requested Kb Count
        result_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Result Count
        response_ref_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Response Ref Count
        eligible_version_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Eligible Version Count
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        actor_user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Actor User Id
        session_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Session Id
        agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent Id
        rag_query_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Rag Query Id
        query_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Query Hash
        query_hash_key_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Query Hash Key Version
        query_length_bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: Query Length Bucket
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Trace Id
      type: object
      required:
        - id
        - created_at
      title: RetrievalAuditLogSummary
      description: List-row view of one retrieval attempt.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````