Document Models - Compose Model
從現有檔模型的文件類型建立新的檔模型。
POST {endpoint}/formrecognizer/documentModels:compose?api-version=2022-08-31
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
支援的認知服務端點 (通訊協定和主機名,例如: https://westus2.api.cognitive.microsoft.com) 。 |
api-version
|
query | True |
要求的 API 版本。 |
要求標頭
名稱 | 必要 | 類型 | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
componentModels | True |
要撰寫的元件檔案模型清單。 |
|
modelId | True |
string |
唯一的檔模型名稱。 |
description |
string |
檔模型描述。 |
|
tags |
object |
與檔模型相關聯的索引鍵/值標籤屬性清單。 |
回應
名稱 | 類型 | Description |
---|---|---|
202 Accepted |
要求已順利排入佇列。 Headers Operation-Location: string |
|
Other Status Codes |
發生錯誤。 |
安全性
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
範例
ComposeDocumentModel
Sample Request
POST {endpoint}/formrecognizer/documentModels:compose?api-version=2022-08-31
{
"modelId": "{composedModelId}",
"description": "{composedModelDescription}",
"componentModels": [
{
"modelId": "{modelId1}"
},
{
"modelId": "{modelId2}"
}
]
}
Sample Response
Operation-Location: {endpoint}/formrecognizer/operations/{operationId}?api-version=2022-08-31
定義
名稱 | Description |
---|---|
Api |
API 版本。 |
Component |
撰寫檔模型的元件。 |
Compose |
要求本文從元件檔模型建立撰寫的檔模型。 |
Error |
錯誤資訊。 |
Error |
錯誤回應物件。 |
Inner |
詳細的錯誤。 |
ApiVersion
API 版本。
名稱 | 類型 | Description |
---|---|---|
2022-08-31 |
string |
ComponentDocumentModelDetails
撰寫檔模型的元件。
名稱 | 類型 | Description |
---|---|---|
modelId |
string |
唯一的檔模型名稱。 |
ComposeDocumentModelRequest
要求本文從元件檔模型建立撰寫的檔模型。
名稱 | 類型 | Description |
---|---|---|
componentModels |
要撰寫的元件檔案模型清單。 |
|
description |
string |
檔模型描述。 |
modelId |
string |
唯一的檔模型名稱。 |
tags |
object |
與檔模型相關聯的索引鍵/值標籤屬性清單。 |
Error
錯誤資訊。
名稱 | 類型 | Description |
---|---|---|
code |
string |
錯誤碼。 |
details |
Error[] |
詳細錯誤清單。 |
innererror |
詳細的錯誤。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤的目標。 |
ErrorResponse
錯誤回應物件。
名稱 | 類型 | Description |
---|---|---|
error |
錯誤資訊。 |
InnerError
詳細的錯誤。
名稱 | 類型 | Description |
---|---|---|
code |
string |
錯誤碼。 |
innererror |
詳細的錯誤。 |
|
message |
string |
錯誤訊息。 |