Document Classifiers - Authorize Classifier Copy
Generates authorization to copy a document classifier to this location with specified classifierId and optional description.
POST {endpoint}/documentintelligence/documentClassifiers:authorizeCopy?api-version=2024-11-30
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
The Document Intelligence service endpoint. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| classifierId | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$ |
Unique document classifier name. |
| description |
string maxLength: 4096 |
Document classifier description. |
|
| tags |
object |
List of key-value tag attributes associated with the document classifier. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| Other Status Codes |
An unexpected error response. |
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
OAuth2Auth
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Token URL:
https://login.microsoftonline.com/common/oauth2/token
Scopes
| Name | Description |
|---|---|
| https://cognitiveservices.azure.com/.default |
Examples
Authorize Copy of Document Classifier
Sample request
POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers:authorizeCopy?api-version=2024-11-30
{
"classifierId": "targetClassifier",
"description": "Target classifier description"
}
Sample response
{
"targetResourceId": "/subscriptions/targetSub/resourceGroups/targetRG/providers/Microsoft.CognitiveServices/accounts/targetService",
"targetResourceRegion": "targetResourceRegion",
"targetClassifierId": "targetClassifier",
"targetClassifierLocation": "https://targetEndpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/targetClassifier",
"accessToken": "accessToken",
"expirationDateTime": "2021-09-23T09:12:54.552Z"
}
Definitions
| Name | Description |
|---|---|
|
Authorize |
Request body to authorize document classifier copy. |
|
Classifier |
Authorization to copy a document classifier to the specified target resource and classifierId. |
|
Document |
The error object. |
|
Document |
Error response object. |
|
Document |
An object containing more specific information about the error. |
AuthorizeClassifierCopyRequest
Request body to authorize document classifier copy.
| Name | Type | Description |
|---|---|---|
| classifierId |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$ |
Unique document classifier name. |
| description |
string maxLength: 4096 |
Document classifier description. |
| tags |
object |
List of key-value tag attributes associated with the document classifier. |
ClassifierCopyAuthorization
Authorization to copy a document classifier to the specified target resource and classifierId.
| Name | Type | Description |
|---|---|---|
| accessToken |
string |
Token used to authorize the request. |
| expirationDateTime |
string (date-time) |
Date/time when the access token expires. |
| targetClassifierId |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$ |
Identifier of the target document classifier. |
| targetClassifierLocation |
string (uri) |
URL of the copied document classifier in the target account. |
| targetResourceId |
string |
ID of the target Azure resource where the document classifier should be copied to. |
| targetResourceRegion |
string |
Location of the target Azure resource where the document classifier should be copied to. |
DocumentIntelligenceError
The error object.
| Name | Type | Description |
|---|---|---|
| code |
string |
One of a server-defined set of error codes. |
| details |
An array of details about specific errors that led to this reported error. |
|
| innererror |
An object containing more specific information than the current object about the error. |
|
| message |
string |
A human-readable representation of the error. |
| target |
string |
The target of the error. |
DocumentIntelligenceErrorResponse
Error response object.
| Name | Type | Description |
|---|---|---|
| error |
Error info. |
DocumentIntelligenceInnerError
An object containing more specific information about the error.
| Name | Type | Description |
|---|---|---|
| code |
string |
One of a server-defined set of error codes. |
| innererror |
Inner error. |
|
| message |
string |
A human-readable representation of the error. |