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

# Fetch documents

> Lookup and return documents by document IDs from an index.



## OpenAPI

````yaml post /projects/{projectId}/indexes/{indexName}/docs/fetch
openapi: 3.1.1
info:
  title: Wrtn AIMP API
  summary: Wrtn AIMP Open API Spec
  version: 1.0.0
servers:
  - url: https://{baseUrl}/{version}
    description: AIMP API endpoints
    variables:
      baseUrl:
        enum:
          - qqcyn6e2xc.execute-api.ap-northeast-2.amazonaws.com
        default: qqcyn6e2xc.execute-api.ap-northeast-2.amazonaws.com
      version:
        enum:
          - v1beta1
        default: v1beta1
security: []
paths:
  /projects/{projectId}/indexes/{indexName}/docs/fetch:
    post:
      description: Lookup and return documents by document IDs from an index.
      parameters:
        - $ref: '#/components/parameters/ContentType'
        - $ref: '#/components/parameters/ProjectApiKey'
        - $ref: '#/components/parameters/ProjectId'
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: string
                  description: >-
                    A list of document IDs to fetch. Note that the maximum
                    number of document IDs is 1000.
                consistentRead:
                  $ref: '#/components/schemas/ConsistentRead'
                includeVectors:
                  $ref: '#/components/schemas/IncludeVectors'
              required:
                - ids
      responses:
        '200':
          description: Fetched documents.
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    description: Total number of documents returned.
                  took:
                    type: integer
                    description: Elapsed time in milliseconds.
                  docs:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: string
                        doc:
                          type: object
components:
  parameters:
    ContentType:
      in: header
      name: content-type
      required: true
      schema:
        type: string
        default: application/json
    ProjectApiKey:
      in: header
      name: x-api-key
      description: Project API Key.
      required: true
      schema:
        type: string
        description: Project API Key.
    ProjectId:
      in: path
      name: projectId
      description: Project ID.
      required: true
      schema:
        type: string
    IndexName:
      in: path
      name: indexName
      description: Index name.
      required: true
      schema:
        type: string
  schemas:
    ConsistentRead:
      type: boolean
      default: false
      description: >-
        If your application requires a strongly consistent read, set
        consistentRead to true. Although a strongly consistent read might take
        more time than an eventually consistent read, it always returns the last
        updated value.
    IncludeVectors:
      type: boolean
      default: false
      description: >-
        If your application need to include vector values in the response, set
        includeVectors to true.

````