BatchGetDocumentStatus - Amazon Kendra

BatchGetDocumentStatus

Returns the indexing status for one or more documents submitted with the BatchPutDocument operation.

When you use the BatchPutDocument operation, documents are indexed asynchronously. You can use the BatchGetDocumentStatus operation to get the current status of a list of documents so that you can determine if they have been successfully indexed.

You can also use the BatchGetDocumentStatus operation to check the status of the BatchDeleteDocument operation. When a document is deleted from the index, Amazon Kendra returns NOT_FOUND as the status.

Request Syntax

{ "DocumentInfoList": [ { "Attributes": [ { "Key": "string", "Value": { "DateValue": number, "LongValue": number, "StringListValue": [ "string" ], "StringValue": "string" } } ], "DocumentId": "string" } ], "IndexId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

DocumentInfoList

A list of DocumentInfo objects that identify the documents for which to get the status. You identify the documents by their document ID and optional attributes.

Type: Array of DocumentInfo objects

Array Members: Minimum number of 1 item. Maximum number of 10 items.

Required: Yes

IndexId

The identifier of the index to add documents to. The index ID is returned by the CreateIndex operation.

Type: String

Length Constraints: Fixed length of 36.

Pattern: [a-zA-Z0-9][a-zA-Z0-9-]*

Required: Yes

Response Syntax

{ "DocumentStatusList": [ { "DocumentId": "string", "DocumentStatus": "string", "FailureCode": "string", "FailureReason": "string" } ], "Errors": [ { "DocumentId": "string", "ErrorCode": "string", "ErrorMessage": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

DocumentStatusList

The status of documents. The status indicates if the document is waiting to be indexed, is in the process of indexing, has completed indexing, or failed indexing. If a document failed indexing, the status provides the reason why.

Type: Array of Status objects

Errors

A list of documents that Amazon Kendra couldn't get the status for. The list includes the ID of the document and the reason that the status couldn't be found.

Type: Array of BatchGetDocumentStatusResponseError objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

HTTP Status Code: 400

ConflictException

HTTP Status Code: 400

InternalServerException

HTTP Status Code: 500

ResourceNotFoundException

HTTP Status Code: 400

ThrottlingException

HTTP Status Code: 400

ValidationException

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: