你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Miscellaneous - Get Operation
获取操作信息。
GET {endpoint}/formrecognizer/operations/{operationId}?api-version=2023-07-31
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
endpoint
|
path | True |
string url |
支持的认知服务终结点 (协议和主机名,例如: https://westus2.api.cognitive.microsoft.com) 。 |
operation
|
path | True |
string uuid |
唯一的操作 ID。 Regex pattern: |
api-version
|
query | True |
string |
请求的 API 版本。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Azure 认知服务订阅的密钥。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK | OperationDetails: |
没问题。 |
Other Status Codes |
遇到错误。 |
安全性
Ocp-Apim-Subscription-Key
Azure 认知服务订阅的密钥。
Type:
apiKey
In:
header
示例
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"
}
}
定义
名称 | 说明 |
---|---|
Azure |
Azure Blob 存储内容。 |
Azure |
Azure Blob 存储 中的文件列表。 |
Classifier |
分类器文档类型信息。 |
Document |
自定义文档模型生成模式。 |
Document |
获取操作响应对象。 |
Document |
文档分类器信息。 |
Document |
使用 JSON 架构样式语法的字段语义架构的说明。 |
Document |
字段值的语义数据类型。 |
Document |
获取操作响应对象。 |
Document |
获取操作响应对象。 |
Document |
获取操作响应对象。 |
Document |
文档模型信息。 |
Document |
文档类型信息。 |
Error |
错误信息。 |
Error |
错误响应对象。 |
Inner |
详细错误。 |
Operation |
操作状态。 |
AzureBlobContentSource
Azure Blob 存储内容。
名称 | 类型 | 说明 |
---|---|---|
containerUrl |
string |
Azure Blob 存储容器 URL。 |
prefix |
string |
Blob 名称前缀。 |
AzureBlobFileListContentSource
Azure Blob 存储 中的文件列表。
名称 | 类型 | 说明 |
---|---|---|
containerUrl |
string |
Azure Blob 存储容器 URL。 |
fileList |
string |
容器中 JSONL 文件的路径,该文件指定用于训练的文档子集。 |
ClassifierDocumentTypeDetails
分类器文档类型信息。
名称 | 类型 | 说明 |
---|---|---|
azureBlobFileListSource |
Azure Blob 存储指定分类器文档类型的训练数据的文件列表。 必须指定 azureBlobSource 或 azureBlobFileListSource。 |
|
azureBlobSource |
Azure Blob 存储包含分类器文档类型的训练数据的位置。 必须指定 azureBlobSource 或 azureBlobFileListSource。 |
DocumentBuildMode
自定义文档模型生成模式。
名称 | 类型 | 说明 |
---|---|---|
neural |
string |
支持具有各种视觉模板的文档。 |
template |
string |
使用类似视觉模板的目标文档。 |
DocumentClassifierBuildOperationDetails
获取操作响应对象。
名称 | 类型 | 说明 |
---|---|---|
apiVersion |
string |
用于创建此操作的 API 版本。 |
createdDateTime |
string |
创建操作时 (UTC) 日期和时间。 |
error |
遇到错误。 |
|
kind |
string:
document |
操作类型。 |
lastUpdatedDateTime |
string |
上次更新状态时 (UTC) 日期和时间。 |
operationId |
string |
Operation ID |
percentCompleted |
integer |
操作进度 (0-100) 。 |
resourceLocation |
string |
此操作所面向的资源的 URL。 |
result |
成功后的操作结果。 |
|
status |
操作状态。 |
|
tags |
object |
与文档模型关联的键值标记属性的列表。 |
DocumentClassifierDetails
文档分类器信息。
名称 | 类型 | 说明 |
---|---|---|
apiVersion |
string |
用于创建此文档分类器的 API 版本。 |
classifierId |
string |
唯一的文档分类器名称。 |
createdDateTime |
string |
创建文档分类器时 (UTC) 日期和时间。 |
description |
string |
文档分类器说明。 |
docTypes |
<string,
Classifier |
要分类的文档类型的列表。 |
expirationDateTime |
string |
文档分类器将过期 (UTC) 日期和时间。 |
DocumentFieldSchema
使用 JSON 架构样式语法的字段语义架构的说明。
名称 | 类型 | 说明 |
---|---|---|
description |
string |
字段说明。 |
example |
string |
示例字段内容。 |
items |
每个数组元素的字段类型架构。 |
|
properties |
<string,
Document |
对象字段的命名子字段。 |
type |
字段值的语义数据类型。 |
DocumentFieldType
字段值的语义数据类型。
名称 | 类型 | 说明 |
---|---|---|
address |
string |
已分析地址。 |
array |
string |
相同类型的子字段列表。 |
boolean |
string |
布尔值,规范化为 true 或 false。 |
countryRegion |
string |
国家/地区,规范化为 ISO 3166-1 alpha-3 格式 (例如 USA) 。 |
currency |
string |
具有可选货币符号和单位的货币金额。 |
date |
string |
日期,规范化为 ISO 8601 (YYYY-MM-DD) 格式。 |
integer |
string |
整数,规范化为 64 位带符号整数。 |
number |
string |
浮点数,规范化为双精度浮点。 |
object |
string |
可能不同类型的子字段的命名列表。 |
phoneNumber |
string |
电话号码,规范化为 E.164 (+{CountryCode}{SubscriberNumber}) 格式。 |
selectionMark |
string |
是否选择了字段? |
signature |
string |
签名是否存在? |
string |
string |
纯文本。 |
time |
string |
时间,规范化为 ISO 8601 (hh:mm:ss) 格式。 |
DocumentModelBuildOperationDetails
获取操作响应对象。
名称 | 类型 | 说明 |
---|---|---|
apiVersion |
string |
用于创建此操作的 API 版本。 |
createdDateTime |
string |
创建操作时 (UTC) 日期和时间。 |
error |
遇到错误。 |
|
kind |
string:
document |
操作类型。 |
lastUpdatedDateTime |
string |
上次更新状态时 (UTC) 日期和时间。 |
operationId |
string |
Operation ID |
percentCompleted |
integer |
操作进度 (0-100) 。 |
resourceLocation |
string |
此操作所面向的资源的 URL。 |
result |
成功后的操作结果。 |
|
status |
操作状态。 |
|
tags |
object |
与文档模型关联的键值标记属性的列表。 |
DocumentModelComposeOperationDetails
获取操作响应对象。
名称 | 类型 | 说明 |
---|---|---|
apiVersion |
string |
用于创建此操作的 API 版本。 |
createdDateTime |
string |
创建操作时 (UTC) 日期和时间。 |
error |
遇到错误。 |
|
kind |
string:
document |
操作类型。 |
lastUpdatedDateTime |
string |
上次更新状态时 (UTC) 日期和时间。 |
operationId |
string |
Operation ID |
percentCompleted |
integer |
操作进度 (0-100) 。 |
resourceLocation |
string |
此操作所面向的资源的 URL。 |
result |
成功后的操作结果。 |
|
status |
操作状态。 |
|
tags |
object |
与文档模型关联的键值标记属性的列表。 |
DocumentModelCopyToOperationDetails
获取操作响应对象。
名称 | 类型 | 说明 |
---|---|---|
apiVersion |
string |
用于创建此操作的 API 版本。 |
createdDateTime |
string |
创建操作时 (UTC) 日期和时间。 |
error |
遇到错误。 |
|
kind |
string:
document |
操作类型。 |
lastUpdatedDateTime |
string |
上次更新状态时 (UTC) 日期和时间。 |
operationId |
string |
Operation ID |
percentCompleted |
integer |
操作进度 (0-100) 。 |
resourceLocation |
string |
此操作所面向的资源的 URL。 |
result |
成功后的操作结果。 |
|
status |
操作状态。 |
|
tags |
object |
与文档模型关联的键值标记属性的列表。 |
DocumentModelDetails
文档模型信息。
名称 | 类型 | 说明 |
---|---|---|
apiVersion |
string |
用于创建此文档模型的 API 版本。 |
createdDateTime |
string |
创建文档模型时 (UTC) 日期和时间。 |
description |
string |
文档模型说明。 |
docTypes |
<string,
Document |
支持的文档类型。 |
expirationDateTime |
string |
文档模型将过期 (UTC) 日期和时间。 |
modelId |
string |
唯一的文档模型名称。 |
tags |
object |
与文档模型关联的键值标记属性的列表。 |
DocumentTypeDetails
文档类型信息。
名称 | 类型 | 说明 |
---|---|---|
buildMode |
自定义文档模型生成模式。 |
|
description |
string |
文档模型说明。 |
fieldConfidence |
object |
每个字段的估计置信度。 |
fieldSchema |
<string,
Document |
使用 JSON 架构样式语法的文档语义架构的说明。 |
Error
错误信息。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
details |
Error[] |
详细错误列表。 |
innererror |
详细错误。 |
|
message |
string |
错误消息。 |
target |
string |
错误的目标。 |
ErrorResponse
错误响应对象。
名称 | 类型 | 说明 |
---|---|---|
error |
错误信息。 |
InnerError
详细错误。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
innererror |
详细错误。 |
|
message |
string |
错误消息。 |
OperationStatus
操作状态。
名称 | 类型 | 说明 |
---|---|---|
canceled |
string |
操作已取消。 |
failed |
string |
操作失败。 |
notStarted |
string |
操作尚未启动。 |
running |
string |
操作正在进行中。 |
succeeded |
string |
操作已成功执行。 |