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

# Get one retrieval-audit log with its scopes and chunk refs



## OpenAPI

````yaml /api-reference/openapi.json get /v1/knowledge-base/audit/retrievals/{ref}
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/{ref}:
    get:
      tags:
        - knowledge-base-audit
      summary: Get one retrieval-audit log with its scopes and chunk refs
      operationId: getKBRetrievalAuditDetail
      parameters:
        - name: ref
          in: path
          required: true
          schema:
            type: string
            title: Ref
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalAuditDetailResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RetrievalAuditDetailResponse:
      properties:
        log:
          $ref: '#/components/schemas/RetrievalAuditLogDetail'
        scopes:
          items:
            $ref: '#/components/schemas/RetrievalAuditScopeView'
          type: array
          title: Scopes
        refs:
          items:
            $ref: '#/components/schemas/RetrievalAuditRefView'
          type: array
          title: Refs
      type: object
      required:
        - log
        - scopes
        - refs
      title: RetrievalAuditDetailResponse
      description: A retrieval log plus its scopes (incl. misses/blocks) and chunk refs.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RetrievalAuditLogDetail:
      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
        caller:
          anyOf:
            - type: string
            - type: 'null'
          title: Caller
        initiator_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Initiator Type
        principal_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Principal Type
        permission:
          anyOf:
            - type: string
            - type: 'null'
          title: Permission
        permission_decision:
          anyOf:
            - type: string
            - type: 'null'
          title: Permission Decision
        query_hash_scope:
          anyOf:
            - type: string
            - type: 'null'
          title: Query Hash Scope
        query_length:
          anyOf:
            - type: integer
            - type: 'null'
          title: Query Length
        eligible_version_digest:
          anyOf:
            - type: string
            - type: 'null'
          title: Eligible Version Digest
        ineligible_counts_by_reason:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Ineligible Counts By Reason
        policy_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Policy Version
        eligibility_rule_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Eligibility Rule Version
        scan_policy_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Scan Policy Version
        scan_policy_decision:
          anyOf:
            - type: string
            - type: 'null'
          title: Scan Policy Decision
        retrieval_config_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Retrieval Config Version
        embedding_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Embedding Model
        reranker_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Reranker Model
        top_k:
          anyOf:
            - type: integer
            - type: 'null'
          title: Top K
        effective_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Effective Limit
        ranking_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Ranking Mode
        alpha:
          anyOf:
            - type: number
            - type: 'null'
          title: Alpha
        reranked:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Reranked
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        error_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Category
        intent_recorded_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Intent Recorded At
        finalized_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finalized At
      type: object
      required:
        - id
        - created_at
      title: RetrievalAuditLogDetail
      description: Detail view — adds policy/config/error context (still hashes/ids only).
    RetrievalAuditScopeView:
      properties:
        knowledge_base_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Knowledge Base Id
        requested:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requested
        eligible_version_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Eligible Version Count
        result_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Result Count
        serving_decision:
          anyOf:
            - type: string
            - type: 'null'
          title: Serving Decision
        scan_policy_decision:
          anyOf:
            - type: string
            - type: 'null'
          title: Scan Policy Decision
        effective_serving_status_counts:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Effective Serving Status Counts
      type: object
      title: RetrievalAuditScopeView
      description: One requested-KB scope of a retrieval (present even for misses/blocks).
    RetrievalAuditRefView:
      properties:
        knowledge_base_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Knowledge Base Id
        document_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Document Id
        document_version_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Document Version Id
        chunk_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Chunk Id
        chunk_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunk Index
        chunk_stable_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Chunk Stable Id
        chunk_content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Chunk Content Hash
        chunk_content_hash_key_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Chunk Content Hash Key Version
        document_version_content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Version Content Hash
        citation_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Citation Ref
        source_uri_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Uri Hash
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rank
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
      type: object
      title: RetrievalAuditRefView
      description: One returned chunk reference — hashes/ids/rank/score only.
    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

````