Miscellaneous - Get Operation

Gets operation info.

GET {endpoint}/formrecognizer/operations/{operationId}?api-version=2023-07-31

URI Parameters

Name In Required Type Description
endpoint
path True

string

url

Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).

operationId
path True

string

uuid

Unique operation ID.

Regex pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

api-version
query True

string

Requested API version.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

The secret key for your Azure Cognitive Services subscription.

Responses

Name Type Description
200 OK OperationDetails:

OK.

Other Status Codes

ErrorResponse

Error encountered.

Security

Ocp-Apim-Subscription-Key

The secret key for your Azure Cognitive Services subscription.

Type: apiKey
In: header

Examples

Get Operation

Sample Request

GET https://myendpoint.cognitiveservices.azure.com/formrecognizer/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2023-07-31

Sample Response

{
  "operationId": "31533879936_426a3e4c-c6fb-4c83-937c-a92414c371a4",
  "status": "succeeded",
  "percentCompleted": 100,
  "createdDateTime": "2021-09-23T09:12:57Z",
  "lastUpdatedDateTime": "2021-09-23T09:13:01Z",
  "kind": "documentModelBuild",
  "resourceLocation": "https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels/myCustomModel",
  "result": {
    "modelId": "myCustomModel",
    "description": "Custom model description",
    "createdDateTime": "2021-09-23T09:13:01Z",
    "apiVersion": "2023-07-31"
  }
}

Definitions

Name Description
AzureBlobContentSource

Azure Blob Storage content.

AzureBlobFileListContentSource

File list in Azure Blob Storage.

ClassifierDocumentTypeDetails

Classifier document type info.

DocumentBuildMode

Custom document model build mode.

DocumentClassifierBuildOperationDetails

Get Operation response object.

DocumentClassifierDetails

Document classifier info.

DocumentFieldSchema

Description of the field semantic schema using a JSON Schema style syntax.

DocumentFieldType

Semantic data type of the field value.

DocumentModelBuildOperationDetails

Get Operation response object.

DocumentModelComposeOperationDetails

Get Operation response object.

DocumentModelCopyToOperationDetails

Get Operation response object.

DocumentModelDetails

Document model info.

DocumentTypeDetails

Document type info.

Error

Error info.

ErrorResponse

Error response object.

InnerError

Detailed error.

OperationStatus

Operation status.

AzureBlobContentSource

Azure Blob Storage content.

Name Type Description
containerUrl

string

Azure Blob Storage container URL.

prefix

string

Blob name prefix.

AzureBlobFileListContentSource

File list in Azure Blob Storage.

Name Type Description
containerUrl

string

Azure Blob Storage container URL.

fileList

string

Path to a JSONL file within the container specifying a subset of documents for training.

ClassifierDocumentTypeDetails

Classifier document type info.

Name Type Description
azureBlobFileListSource

AzureBlobFileListContentSource

Azure Blob Storage file list specifying the training data for a classifier document type. Either azureBlobSource or azureBlobFileListSource must be specified.

azureBlobSource

AzureBlobContentSource

Azure Blob Storage location containing the training data for a classifier document type. Either azureBlobSource or azureBlobFileListSource must be specified.

DocumentBuildMode

Custom document model build mode.

Name Type Description
neural

string

Support documents with diverse visual templates.

template

string

Target documents with similar visual templates.

DocumentClassifierBuildOperationDetails

Get Operation response object.

Name Type Description
apiVersion

string

API version used to create this operation.

createdDateTime

string

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

error

Error

Encountered error.

kind string:

documentClassifierBuild

Type of operation.

lastUpdatedDateTime

string

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

operationId

string

Operation ID

percentCompleted

integer

Operation progress (0-100).

resourceLocation

string

URL of the resource targeted by this operation.

result

DocumentClassifierDetails

Operation result upon success.

status

OperationStatus

Operation status.

tags

object

List of key-value tag attributes associated with the document model.

DocumentClassifierDetails

Document classifier info.

Name Type Description
apiVersion

string

API version used to create this document classifier.

classifierId

string

Unique document classifier name.

createdDateTime

string

Date and time (UTC) when the document classifier was created.

description

string

Document classifier description.

docTypes

<string,  ClassifierDocumentTypeDetails>

List of document types to classify against.

expirationDateTime

string

Date and time (UTC) when the document classifier will expire.

DocumentFieldSchema

Description of the field semantic schema using a JSON Schema style syntax.

Name Type Description
description

string

Field description.

example

string

Example field content.

items

DocumentFieldSchema

Field type schema of each array element.

properties

<string,  DocumentFieldSchema>

Named sub-fields of the object field.

type

DocumentFieldType

Semantic data type of the field value.

DocumentFieldType

Semantic data type of the field value.

Name Type Description
address

string

Parsed address.

array

string

List of subfields of the same type.

boolean

string

Boolean value, normalized to true or false.

countryRegion

string

Country/region, normalized to ISO 3166-1 alpha-3 format (ex. USA).

currency

string

Currency amount with optional currency symbol and unit.

date

string

Date, normalized to ISO 8601 (YYYY-MM-DD) format.

integer

string

Integer number, normalized to 64-bit signed integer.

number

string

Floating point number, normalized to double precision floating point.

object

string

Named list of subfields of potentially different types.

phoneNumber

string

Phone number, normalized to E.164 (+{CountryCode}{SubscriberNumber}) format.

selectionMark

string

Is field selected?

signature

string

Is signature present?

string

string

Plain text.

time

string

Time, normalized to ISO 8601 (hh:mm:ss) format.

DocumentModelBuildOperationDetails

Get Operation response object.

Name Type Description
apiVersion

string

API version used to create this operation.

createdDateTime

string

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

error

Error

Encountered error.

kind string:

documentModelBuild

Type of operation.

lastUpdatedDateTime

string

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

operationId

string

Operation ID

percentCompleted

integer

Operation progress (0-100).

resourceLocation

string

URL of the resource targeted by this operation.

result

DocumentModelDetails

Operation result upon success.

status

OperationStatus

Operation status.

tags

object

List of key-value tag attributes associated with the document model.

DocumentModelComposeOperationDetails

Get Operation response object.

Name Type Description
apiVersion

string

API version used to create this operation.

createdDateTime

string

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

error

Error

Encountered error.

kind string:

documentModelCompose

Type of operation.

lastUpdatedDateTime

string

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

operationId

string

Operation ID

percentCompleted

integer

Operation progress (0-100).

resourceLocation

string

URL of the resource targeted by this operation.

result

DocumentModelDetails

Operation result upon success.

status

OperationStatus

Operation status.

tags

object

List of key-value tag attributes associated with the document model.

DocumentModelCopyToOperationDetails

Get Operation response object.

Name Type Description
apiVersion

string

API version used to create this operation.

createdDateTime

string

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

error

Error

Encountered error.

kind string:

documentModelCopyTo

Type of operation.

lastUpdatedDateTime

string

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

operationId

string

Operation ID

percentCompleted

integer

Operation progress (0-100).

resourceLocation

string

URL of the resource targeted by this operation.

result

DocumentModelDetails

Operation result upon success.

status

OperationStatus

Operation status.

tags

object

List of key-value tag attributes associated with the document model.

DocumentModelDetails

Document model info.

Name Type Description
apiVersion

string

API version used to create this document model.

createdDateTime

string

Date and time (UTC) when the document model was created.

description

string

Document model description.

docTypes

<string,  DocumentTypeDetails>

Supported document types.

expirationDateTime

string

Date and time (UTC) when the document model will expire.

modelId

string

Unique document model name.

tags

object

List of key-value tag attributes associated with the document model.

DocumentTypeDetails

Document type info.

Name Type Description
buildMode

DocumentBuildMode

Custom document model build mode.

description

string

Document model description.

fieldConfidence

object

Estimated confidence for each field.

fieldSchema

<string,  DocumentFieldSchema>

Description of the document semantic schema using a JSON Schema style syntax.

Error

Error info.

Name Type Description
code

string

Error code.

details

Error[]

List of detailed errors.

innererror

InnerError

Detailed error.

message

string

Error message.

target

string

Target of the error.

ErrorResponse

Error response object.

Name Type Description
error

Error

Error info.

InnerError

Detailed error.

Name Type Description
code

string

Error code.

innererror

InnerError

Detailed error.

message

string

Error message.

OperationStatus

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.

succeeded

string

The operation has succeeded.