Document Models - Get Analyze Batch Result

Gets the result of batch document analysis.

GET {endpoint}/documentintelligence/documentModels/{modelId}/analyzeBatchResults/{resultId}?api-version=2024-11-30

URI Parameters

Name In Required Type Description
endpoint
path True

string

uri

The Document Intelligence service endpoint.

modelId
path True

string

Unique document model name.

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$

resultId
path True

string

uuid

Analyze batch operation result ID.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

AnalyzeBatchOperation

The request has succeeded.

Other Status Codes

DocumentIntelligenceErrorResponse

An unexpected error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Flow: accessCode
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/token

Scopes

Name Description
https://cognitiveservices.azure.com/.default

Examples

Get Analyze Batch Documents Result

Sample request

GET https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/prebuilt-invoice/analyzeBatchResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2024-11-30

Sample response

{
  "resultId": "3b31320d-8bab-4f88-b19c-2322a7f11034",
  "status": "succeeded",
  "percentCompleted": 100,
  "createdDateTime": "2021-09-24T13:00:46Z",
  "lastUpdatedDateTime": "2021-09-24T13:00:49Z",
  "result": {
    "succeededCount": 1,
    "failedCount": 1,
    "skippedCount": 1,
    "details": [
      {
        "sourceUrl": "https://myStorageAccount.blob.core.windows.net/myContainer/trainingDocs/file1.pdf",
        "resultUrl": "https://myStorageAccount.blob.core.windows.net/myOutputContainer/trainingDocsResult/file1.pdf.ocr.json",
        "status": "succeeded"
      },
      {
        "sourceUrl": "https://myStorageAccount.blob.core.windows.net/myContainer/trainingDocs/file2.jpg",
        "status": "failed",
        "error": {
          "code": "InvalidRequest",
          "message": "Invalid request.",
          "innererror": {
            "code": "InvalidContent",
            "message": "The file format is unsupported or corrupted. Refer to documentation for the list of supported formats."
          }
        }
      },
      {
        "sourceUrl": "https://myStorageAccount.blob.core.windows.net/myContainer/trainingDocs/file3.png",
        "status": "skipped"
      }
    ]
  }
}

Definitions

Name Description
AnalyzeBatchOperation

Status and result of the analyze batch operation.

AnalyzeBatchOperationDetail

Operation detail for a document in a batch analysis.

AnalyzeBatchResult

Batch document analysis result.

DocumentIntelligenceError

The error object.

DocumentIntelligenceErrorResponse

Error response object.

DocumentIntelligenceInnerError

An object containing more specific information about the error.

DocumentIntelligenceOperationStatus

Operation status.

AnalyzeBatchOperation

Status and result of the analyze batch operation.

Name Type Description
createdDateTime

string

Date and time (UTC) when the operation was submitted.

error

DocumentIntelligenceError

Encountered error during batch document analysis.

lastUpdatedDateTime

string

Date and time (UTC) when the status was last updated.

percentCompleted

integer

Operation progress (0-100).

result

AnalyzeBatchResult

Batch document analysis result.

resultId

string

Analyze batch operation result ID.

status

DocumentIntelligenceOperationStatus

Operation status. notStarted, running, succeeded, or failed

AnalyzeBatchOperationDetail

Operation detail for a document in a batch analysis.

Name Type Description
error

DocumentIntelligenceError

Encountered error.

resultUrl

string

URL of the analyze result JSON.

sourceUrl

string

URL of the source document.

status

DocumentIntelligenceOperationStatus

Analyze status. succeeded, failed, or skipped

AnalyzeBatchResult

Batch document analysis result.

Name Type Description
details

AnalyzeBatchOperationDetail[]

Operation detail for each document in the batch.

failedCount

integer

Number of documents that completed with status failed.

skippedCount

integer

Number of documents that completed with status skipped.

succeededCount

integer

Number of documents that completed with status succeeded.

DocumentIntelligenceError

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

DocumentIntelligenceError[]

An array of details about specific errors that led to this reported error.

innererror

DocumentIntelligenceInnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

DocumentIntelligenceErrorResponse

Error response object.

Name Type Description
error

DocumentIntelligenceError

Error info.

DocumentIntelligenceInnerError

An object containing more specific information about the error.

Name Type Description
code

string

One of a server-defined set of error codes.

innererror

DocumentIntelligenceInnerError

Inner error.

message

string

A human-readable representation of the error.

DocumentIntelligenceOperationStatus

Operation status.

Name Type Description
canceled

string

The operation has been canceled.

failed

string

The operation has failed.

notStarted

string

The operation has not started yet.

running

string

The operation is in progress.

skipped

string

The operation has been skipped.

succeeded

string

The operation has succeeded.