Document Models - Copy Model To
Copies document model to the target resource, region, and modelId.
POST {endpoint}/formrecognizer/documentModels/{modelId}:copyTo?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). |
model
|
path | True |
string |
Unique document model name. Regex pattern: |
api-version
|
query | True |
Requested API version. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Request Body
Name | Required | Type | Description |
---|---|---|---|
accessToken | True |
string |
Token used to authorize the request. |
expirationDateTime | True |
string |
Date/time when the access token expires. |
targetModelId | True |
string |
Identifier of the target document model. |
targetModelLocation | True |
string |
URL of the copied document model in the target account. |
targetResourceId | True |
string |
ID of the target Azure resource where the document model should be copied to. |
targetResourceRegion | True |
string |
Location of the target Azure resource where the document model should be copied to. |
Responses
Name | Type | Description |
---|---|---|
202 Accepted |
Request is queued successfully. Headers Operation-Location: string |
|
Other Status Codes |
Error encountered. |
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Examples
CopyDocumentModelTo
Sample request
POST {endpoint}/formrecognizer/documentModels/sourceModel:copyTo?api-version=2022-08-31
{
"targetResourceId": "{targetResourceId}",
"targetResourceRegion": "{targetResourceRegion}",
"targetModelId": "targetModel",
"targetModelLocation": "{targetEndpoint}/formrecognizer/documentModels/targetModel?api-version=2022-08-31",
"accessToken": "{accessToken}",
"expirationDateTime": "2021-09-23T09:12:54.552Z"
}
Sample response
Operation-Location: {endpoint}/formrecognizer/operations/{operationId}?api-version=2022-08-31
Definitions
Name | Description |
---|---|
Api |
API version. |
Copy |
Authorization to copy a document model to the specified target resource and modelId. |
Error |
Error info. |
Error |
Error response object. |
Inner |
Detailed error. |
ApiVersion
API version.
Name | Type | Description |
---|---|---|
2022-08-31 |
string |
CopyAuthorization
Authorization to copy a document model to the specified target resource and modelId.
Name | Type | Description |
---|---|---|
accessToken |
string |
Token used to authorize the request. |
expirationDateTime |
string |
Date/time when the access token expires. |
targetModelId |
string |
Identifier of the target document model. |
targetModelLocation |
string |
URL of the copied document model in the target account. |
targetResourceId |
string |
ID of the target Azure resource where the document model should be copied to. |
targetResourceRegion |
string |
Location of the target Azure resource where the document model should be copied to. |
Error
Error info.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
Error[] |
List of detailed errors. |
innererror |
Detailed error. |
|
message |
string |
Error message. |
target |
string |
Target of the error. |
ErrorResponse
Error response object.
Name | Type | Description |
---|---|---|
error |
Error info. |
InnerError
Detailed error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
innererror |
Detailed error. |
|
message |
string |
Error message. |