Share via


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)

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

Unique operation ID.

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 (url)

Azure Blob Storage container URL.

prefix

string

Blob name prefix.

AzureBlobFileListContentSource

File list in Azure Blob Storage.

Name Type Description
containerUrl

string (url)

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.

Value Description
template

Target documents with similar visual templates.

neural

Support documents with diverse visual templates.

DocumentClassifierBuildOperationDetails

Get Operation response object.

Name Type Description
apiVersion

string

API version used to create this operation.

createdDateTime

string (date-time)

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

error

Error

Encountered error.

kind string:

documentClassifierBuild

Type of operation.

lastUpdatedDateTime

string (date-time)

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

operationId

string

Operation ID

percentCompleted

integer (int32)

minimum: 0
maximum: 100

Operation progress (0-100).

resourceLocation

string (url)

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

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

Unique document classifier name.

createdDateTime

string (date-time)

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

description

string

maxLength: 4096

Document classifier description.

docTypes

<string,  ClassifierDocumentTypeDetails>

List of document types to classify against.

expirationDateTime

string (date-time)

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.

Value Description
string

Plain text.

date

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

time

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

phoneNumber

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

number

Floating point number, normalized to double precision floating point.

integer

Integer number, normalized to 64-bit signed integer.

selectionMark

Is field selected?

countryRegion

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

signature

Is signature present?

array

List of subfields of the same type.

object

Named list of subfields of potentially different types.

currency

Currency amount with optional currency symbol and unit.

address

Parsed address.

boolean

Boolean value, normalized to true or false.

DocumentModelBuildOperationDetails

Get Operation response object.

Name Type Description
apiVersion

string

API version used to create this operation.

createdDateTime

string (date-time)

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

error

Error

Encountered error.

kind string:

documentModelBuild

Type of operation.

lastUpdatedDateTime

string (date-time)

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

operationId

string

Operation ID

percentCompleted

integer (int32)

minimum: 0
maximum: 100

Operation progress (0-100).

resourceLocation

string (url)

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-time)

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

error

Error

Encountered error.

kind string:

documentModelCompose

Type of operation.

lastUpdatedDateTime

string (date-time)

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

operationId

string

Operation ID

percentCompleted

integer (int32)

minimum: 0
maximum: 100

Operation progress (0-100).

resourceLocation

string (url)

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-time)

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

error

Error

Encountered error.

kind string:

documentModelCopyTo

Type of operation.

lastUpdatedDateTime

string (date-time)

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

operationId

string

Operation ID

percentCompleted

integer (int32)

minimum: 0
maximum: 100

Operation progress (0-100).

resourceLocation

string (url)

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-time)

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

description

string

maxLength: 4096

Document model description.

docTypes

<string,  DocumentTypeDetails>

Supported document types.

expirationDateTime

string (date-time)

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

modelId

string

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

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

maxLength: 4096

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.

Value Description
notStarted

The operation has not started yet.

running

The operation is in progress.

failed

The operation has failed.

succeeded

The operation has succeeded.

canceled

The operation has been canceled.