Document Models - Get Analyze Batch Result

Gets the result of batch document analysis.

GET {endpoint}/documentintelligence/documentModels/{modelId}/analyzeBatchResults/{resultId}?api-version=2024-07-31-preview

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

AnalyzeBatchResultOperation

The request has succeeded.

Other Status Codes

ErrorResponse

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-07-31-preview

Sample response

{
  "status": "completed",
  "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
AnalyzeBatchOperationDetail

Operation detail for a document in a batch analysis.

AnalyzeBatchResult

Batch document analysis result.

AnalyzeBatchResultOperation

Status and result of the analyze batch operation.

Error

The error object.

ErrorResponse

Error response object.

InnerError

An object containing more specific information about the error.

OperationStatus

Operation status.

AnalyzeBatchOperationDetail

Operation detail for a document in a batch analysis.

Name Type Description
error

Error

Encountered error.

resultUrl

string

URL of the analyze result JSON.

sourceUrl

string

URL of the source document.

status

OperationStatus

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.

AnalyzeBatchResultOperation

Status and result of the analyze batch operation.

Name Type Description
createdDateTime

string

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

error

Error

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.

status

OperationStatus

Operation status. notStarted, running, completed, or failed

Error

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

Error[]

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

innererror

InnerError

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.

ErrorResponse

Error response object.

Name Type Description
error

Error

Error info.

InnerError

An object containing more specific information about the error.

Name Type Description
code

string

One of a server-defined set of error codes.

innererror

InnerError

Inner error.

message

string

A human-readable representation of the error.

OperationStatus

Operation status.

Name Type Description
canceled

string

The operation has been canceled.

completed

string

The operation has completed.

failed

string

The operation has failed.

notStarted

string

The operation has not started yet.

running

string

The operation is in progress.

succeeded

string

The operation has succeeded.