{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-list-knowledge-base-documents-response-schema.json",
  "title": "ListKnowledgeBaseDocumentsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-documents-api-openapi.yml#/components/schemas/ListKnowledgeBaseDocumentsResponse",
  "type": "object",
  "properties": {
    "documentDetails": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/KnowledgeBaseDocumentDetail"
      },
      "description": "A list of objects, each of which contains information about the documents that were retrieved."
    },
    "nextToken": {
      "type": "string",
      "description": "If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results."
    }
  },
  "required": [
    "documentDetails"
  ],
  "$defs": {
    "BedrockAgentS3Location": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The location's URI. For example, s3://my-bucket/chunk-processor/."
        }
      },
      "required": [
        "uri"
      ]
    },
    "CustomDocumentIdentifier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the document to ingest into a custom data source."
        }
      },
      "required": [
        "id"
      ]
    },
    "DocumentIdentifier": {
      "type": "object",
      "properties": {
        "dataSourceType": {
          "type": "string",
          "enum": [
            "CUSTOM",
            "S3"
          ],
          "description": "The type of data source connected to the knowledge base that contains the document."
        },
        "s3": {
          "$ref": "#/$defs/BedrockAgentS3Location"
        },
        "custom": {
          "$ref": "#/$defs/CustomDocumentIdentifier"
        }
      },
      "required": [
        "dataSourceType"
      ]
    },
    "KnowledgeBaseDocumentDetail": {
      "type": "object",
      "properties": {
        "knowledgeBaseId": {
          "type": "string",
          "description": "The identifier of the knowledge base that the document was ingested into or deleted from."
        },
        "dataSourceId": {
          "type": "string",
          "description": "The identifier of the data source connected to the knowledge base that the document was ingested into or deleted from."
        },
        "status": {
          "type": "string",
          "enum": [
            "INDEXED",
            "PARTIALLY_INDEXED",
            "PENDING",
            "FAILED",
            "METADATA_PARTIALLY_INDEXED",
            "METADATA_UPDATE_FAILED",
            "IGNORED",
            "NOT_FOUND",
            "STARTING",
            "IN_PROGRESS",
            "DELETING",
            "DELETE_IN_PROGRESS"
          ],
          "description": "The ingestion status of the document. The following statuses are possible: STARTING – You submitted the ingestion job containing the document. PENDING – The document is waiting to be ingested. IN_PROGRESS – The document is being ingested. INDEXED – The document was successfully indexed. PARTIALLY_INDEXED – The document was partially indexed. METADATA_PARTIALLY_INDEXED – You submitted metadata for an existing document and it was partially indexed. METADATA_UPDATE_FAILED – You submitted a metadata update for an existing document but it failed. FAILED – The document failed to be ingested. NOT_FOU"
        },
        "identifier": {
          "$ref": "#/$defs/DocumentIdentifier"
        },
        "statusReason": {
          "type": "string",
          "description": "The reason for the status. Appears alongside the status IGNORED."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time at which the document was last updated."
        }
      },
      "required": [
        "knowledgeBaseId",
        "dataSourceId",
        "status",
        "identifier"
      ]
    }
  }
}