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

# Get document metadata and associated chunks

> Return metadata for a single document together with all its chunks.

Combines data from ``knowledge_documents`` and ``knowledge_chunks``.
Returns 404 if the document is not found.



## OpenAPI

````yaml /api-reference/knowledge-api.json get /v1/knowledge/documents/{doc_id}
openapi: 3.1.0
info:
  title: Strattum Knowledge API
  description: >-
    REST API that serves semantic document search — embeddings via the
    configured LLM provider, indexed in Qdrant, with metadata stored in
    PostgreSQL. (PRD-004, Workstream 1.4)
  version: 1.0.0
servers: []
security: []
paths:
  /v1/knowledge/documents/{doc_id}:
    get:
      tags:
        - knowledge
      summary: Get document metadata and associated chunks
      description: |-
        Return metadata for a single document together with all its chunks.

        Combines data from ``knowledge_documents`` and ``knowledge_chunks``.
        Returns 404 if the document is not found.
      operationId: get_document_v1_knowledge_documents__doc_id__get
      parameters:
        - name: doc_id
          in: path
          required: true
          schema:
            type: string
            title: Doc Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentDetailResponse'
        '404':
          description: Document not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '503':
          description: PostgreSQL is unavailable
components:
  schemas:
    DocumentDetailResponse:
      properties:
        document:
          $ref: '#/components/schemas/DocumentResponse'
        chunks:
          items:
            $ref: '#/components/schemas/ChunkResponse'
          type: array
          title: Chunks
        chunk_count:
          type: integer
          title: Chunk Count
      type: object
      required:
        - document
        - chunks
        - chunk_count
      title: DocumentDetailResponse
      description: Response for GET /v1/knowledge/documents/{doc_id}.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentResponse:
      properties:
        doc_id:
          type: string
          title: Doc Id
        source:
          type: string
          title: Source
        title:
          type: string
          title: Title
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
        chunk_count:
          type: integer
          title: Chunk Count
        owner:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        summary_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary Model
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        indexed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Indexed At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        entity_tags:
          anyOf:
            - items:
                $ref: '#/components/schemas/EmbeddedTagResponse'
              type: array
            - type: 'null'
          title: Entity Tags
      type: object
      required:
        - doc_id
        - source
        - title
        - chunk_count
      title: DocumentResponse
      description: A single document record from knowledge_documents.
    ChunkResponse:
      properties:
        chunk_id:
          type: string
          title: Chunk Id
        doc_id:
          type: string
          title: Doc Id
        position:
          type: integer
          title: Position
        content:
          type: string
          title: Content
        char_count:
          type: integer
          title: Char Count
        qdrant_point_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Qdrant Point Id
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
      type: object
      required:
        - chunk_id
        - doc_id
        - position
        - content
        - char_count
      title: ChunkResponse
      description: A single chunk record from knowledge_chunks.
    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
    EmbeddedTagResponse:
      properties:
        tag:
          type: string
          title: Tag
        status:
          type: string
          title: Status
        source:
          type: string
          title: Source
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
      type: object
      required:
        - tag
        - status
        - source
      title: EmbeddedTagResponse
      description: >-
        A tag embedded in a document list response (used when
        include_tags=true).

````