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

# Batch-query indexing status of one or more documents

> Return the current lifecycle state of a batch of documents.

Designed for the front-end's status polling loop: the page sends
every in-flight document id at once so per-document round-trips
do not multiply with concurrency.

Args:
    knowledge_base_id (`str`):
        The target knowledge base id.
    ids (`str`):
        Comma-separated document ids.
    user_id (`str`):
        Injected authenticated user ID.
    service (`KnowledgeBaseService`):
        Injected knowledge base service.

Returns:
    `ListKnowledgeDocumentStatusResponse`:
        Views for the matched documents.



## OpenAPI

````yaml /versions/2.0.4dev/en/deploy/openapi.json get /knowledge_bases/{knowledge_base_id}/documents/status
openapi: 3.1.0
info:
  title: AgentScope
  version: 2.0.3
servers: []
security: []
paths:
  /knowledge_bases/{knowledge_base_id}/documents/status:
    get:
      tags:
        - knowledge_bases
      summary: Batch-query indexing status of one or more documents
      description: |-
        Return the current lifecycle state of a batch of documents.

        Designed for the front-end's status polling loop: the page sends
        every in-flight document id at once so per-document round-trips
        do not multiply with concurrency.

        Args:
            knowledge_base_id (`str`):
                The target knowledge base id.
            ids (`str`):
                Comma-separated document ids.
            user_id (`str`):
                Injected authenticated user ID.
            service (`KnowledgeBaseService`):
                Injected knowledge base service.

        Returns:
            `ListKnowledgeDocumentStatusResponse`:
                Views for the matched documents.
      operationId: >-
        list_knowledge_document_status_knowledge_bases__knowledge_base_id__documents_status_get
      parameters:
        - name: knowledge_base_id
          in: path
          required: true
          schema:
            type: string
            description: The knowledge base id.
            title: Knowledge Base Id
          description: The knowledge base id.
        - name: ids
          in: query
          required: true
          schema:
            type: string
            description: >-
              Comma-separated list of document ids to query. Missing ids are
              silently omitted from the response.
            title: Ids
          description: >-
            Comma-separated list of document ids to query. Missing ids are
            silently omitted from the response.
        - name: x-user-id
          in: header
          required: true
          schema:
            type: string
            description: >-
              Caller's user ID. Temporary header-based identity; will be
              replaced by JWT auth.
            title: X-User-Id
          description: >-
            Caller's user ID. Temporary header-based identity; will be replaced
            by JWT auth.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListKnowledgeDocumentStatusResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListKnowledgeDocumentStatusResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/KnowledgeDocumentView'
          type: array
          title: Items
          description: >-
            Subset of the requested documents that still exist. Missing ids are
            silently omitted — clients may legitimately ask about a document
            that was deleted between two polls.
      type: object
      required:
        - items
      title: ListKnowledgeDocumentStatusResponse
      description: Response body for batch document-status polling.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KnowledgeDocumentView:
      properties:
        id:
          type: string
          title: Id
          description: The document identifier.
        filename:
          type: string
          title: Filename
          description: Original filename at upload time.
        size:
          type: integer
          title: Size
          description: Document size in bytes.
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
          description: IANA media type recorded at upload time, if any.
        status:
          type: string
          enum:
            - pending
            - parsing
            - chunking
            - indexing
            - ready
            - error
          title: Status
          description: Current lifecycle state of the document.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Human-readable failure reason when ``status == 'error'``.
        chunk_count:
          type: integer
          title: Chunk Count
          description: Number of chunks indexed so far.
          default: 0
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Upload timestamp.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Last status transition timestamp.
      type: object
      required:
        - id
        - filename
        - size
        - status
        - created_at
        - updated_at
      title: KnowledgeDocumentView
      description: |-
        A document record as exposed to API clients.

        Surfaces both the static fields the UI needs to render a row
        (``filename`` / ``size``) and the live lifecycle fields the front
        end polls (``status`` / ``error`` / ``chunk_count``).  Internal
        fields (``user_id`` / ``blob_uri`` / ``processing_node`` / lease)
        are deliberately omitted — clients have no business introspecting
        them.
    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

````