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

> List every document in a knowledge base

# List Knowledge Documents



## OpenAPI

````yaml get /v1/knowledge/{knowledge_id}/documents
openapi: 3.1.0
info:
  title: spectra-server
  description: The API for Spectra Backend.
  version: 0.1.0
servers:
  - url: https://api-spectra.duplik.cn
security: []
paths:
  /v1/knowledge/{knowledge_id}/documents:
    get:
      tags:
        - Knowledge
      summary: List Knowledge Documents
      description: >-
        List every document in a knowledge base, ignoring the folder structure.
        The whole list is returned in one response — there is no pagination — so
        prefer `GET /v1/knowledge/{knowledge_id}/files` when you want one folder
        at a time, paginated, with file details and parsing progress.


        Each item is trimmed down to `document_id`, `name`, `process_status`,
        `created_at` and `entity_names`. Use `process_status` to keep only
        documents in a given parsing state, for example 200 for the ones that
        finished and are searchable.
      operationId: list_knowledge_documents_v1_knowledge__knowledge_id__documents_get
      parameters:
        - name: knowledge_id
          in: path
          required: true
          schema:
            type: string
            title: Knowledge Id
            description: Knowledge base ID
          description: Knowledge base ID
        - name: process_status
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                enum:
                  - 0
                  - 100
                  - 200
                  - 300
              - type: 'null'
            title: Process Status
            description: >-
              Keep only documents in this parsing state. 0: queued, 100:
              processing, 200: completed, 300: failed
          description: >-
            Keep only documents in this parsing state. 0: queued, 100:
            processing, 200: completed, 300: failed
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/DocumentSimpleRead'
                type: array
                title: Response List Knowledge Documents
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - HTTPBearer: []
components:
  schemas:
    DocumentSimpleRead:
      properties:
        document_id:
          type: string
          title: Document Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        process_status:
          anyOf:
            - type: integer
              enum:
                - 0
                - 100
                - 200
                - 300
            - type: 'null'
          title: Process Status
          description: '0: queued, 100: processing, 200: completed, 300: failed'
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At
        entity_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Entity Names
      type: object
      required:
        - document_id
      title: DocumentSimpleRead
    ErrorResponse:
      properties:
        code:
          type: integer
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
        - code
        - message
      title: ErrorResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````