Share via


Miscellaneous - List Operations

Lists all operations.

GET {endpoint}/formrecognizer/operations?api-version=2022-08-31

URI Parameters

Name In Required Type Description
endpoint
path True

string

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

api-version
query True

ApiVersion

Requested API version.

Request Header

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

string

Responses

Name Type Description
200 OK

GetOperationsResponse

OK.

Other Status Codes

ErrorResponse

Error encountered.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

GetOperations

Sample request

GET {endpoint}/formrecognizer/operations?api-version=2022-08-31

Sample response

{
  "value": [
    {
      "operationId": "{operationId}",
      "status": "running",
      "percentCompleted": 0,
      "createdDateTime": "2021-09-23T09:12:57Z",
      "lastUpdatedDateTime": "2021-09-23T09:12:58Z",
      "kind": "documentModelBuild",
      "resourceLocation": "{endpoint}/formrecognizer/documentModels/{modelId}",
      "apiVersion": "2022-08-31"
    }
  ],
  "nextLink": "{nextLinkUrl}"
}

Definitions

Name Description
ApiVersion

API version.

Error

Error info.

ErrorResponse

Error response object.

GetOperationsResponse

List Operations response object.

InnerError

Detailed error.

OperationKind

Type of operation.

OperationStatus

Operation status.

OperationSummary

Operation info.

ApiVersion

API version.

Value Description
2022-08-31

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.

GetOperationsResponse

List Operations response object.

Name Type Description
nextLink

string

Link to the next page of operations.

value

OperationSummary[]

List of operations.

InnerError

Detailed error.

Name Type Description
code

string

Error code.

innererror

InnerError

Detailed error.

message

string

Error message.

OperationKind

Type of operation.

Value Description
documentModelBuild
documentModelCompose
documentModelCopyTo

OperationStatus

Operation status.

Value Description
notStarted
running
failed
succeeded
canceled

OperationSummary

Operation info.

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.

kind

OperationKind

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 of the resource targeted by this operation.

status

OperationStatus

Operation status.

tags

object

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