你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Document Translation - Get Supported Glossary Formats
Returns the list of supported glossary formats
The list of supported glossary formats supported by the Document Translation service.
The list includes the common file extension used.
GET {endpoint}/translator/text/batch/v1.0/glossaries/formats
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). |
Request Header
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Provide your cognitive services subscription key here. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Returns the list of supported glossary file formats Headers Retry-After: integer |
|
429 Too Many Requests |
Too many requests |
|
500 Internal Server Error |
Internal Server Error |
|
Other Status Codes |
Server temporary unavailable |
Security
Ocp-Apim-Subscription-Key
Provide your cognitive services subscription key here.
Type:
apiKey
In:
header
Examples
Get Glossary Formats
Sample Request
GET {endpoint}/translator/text/batch/v1.0/glossaries/formats
Sample Response
{
"error": {
"code": "RequestRateTooHigh",
"message": "User's request rate is too high",
"innerError": {
"code": "RateTooHigh",
"message": "Request rate is too high"
}
}
}
{
"error": {
"code": "InternalServerError",
"message": "Internal Server Error",
"innerError": {
"code": "InternalServerError",
"message": "Unexpected internal server error has occurred"
}
}
}
{
"error": {
"code": "ServiceUnavailable",
"message": "Service is temporary unavailable",
"innerError": {
"code": "ServiceTemporaryUnavailable",
"message": "Service is currently unavailable. Please try again later"
}
}
}
retry-after: 30
ETag: 686897696a7c876b7e
{
"value": [
{
"format": "XLIFF",
"fileExtensions": [
".xlf"
],
"contentTypes": [
"application/xliff+xml"
],
"defaultVersion": "1.2",
"versions": [
"1.0",
"1.1",
"1.2"
]
},
{
"format": "TMX",
"fileExtensions": [
".tmx"
],
"contentTypes": [],
"versions": [
"1.0",
"1.1",
"1.2",
"1.3",
"1.4"
]
}
]
}
Definitions
Name | Description |
---|---|
File |
|
Inner |
New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested). |
Supported |
Base type for List return in our api |
Translation |
This contains an outer error with error code, message, details, target and an inner error with more descriptive details. |
Translation |
Enums containing high level error codes. |
Translation |
Contains unified error information used for HTTP responses across any Cognitive Service. Instances can be created either through Microsoft.CloudAI.Containers.HttpStatusExceptionV2 or by returning it directly from a controller. |
FileFormat
Name | Type | Description |
---|---|---|
contentTypes |
string[] |
Supported Content-Types for this format |
defaultVersion |
string |
Default version if none is specified |
fileExtensions |
string[] |
Supported file extension for this format |
format |
string |
Name of the format |
versions |
string[] |
Supported Version |
InnerTranslationError
New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested).
Name | Type | Description |
---|---|---|
code |
string |
Gets code error string. |
innerError |
New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested). |
|
message |
string |
Gets high level error message. |
target |
string |
Gets the source of the error. For example it would be "documents" or "document id" in case of invalid document. |
SupportedFileFormats
Base type for List return in our api
Name | Type | Description |
---|---|---|
value |
list of objects |
TranslationError
This contains an outer error with error code, message, details, target and an inner error with more descriptive details.
Name | Type | Description |
---|---|---|
code |
Enums containing high level error codes. |
|
innerError |
New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested). |
|
message |
string |
Gets high level error message. |
target |
string |
Gets the source of the error. For example it would be "documents" or "document id" in case of invalid document. |
TranslationErrorCode
Enums containing high level error codes.
Name | Type | Description |
---|---|---|
InternalServerError |
string |
|
InvalidArgument |
string |
|
InvalidRequest |
string |
|
RequestRateTooHigh |
string |
|
ResourceNotFound |
string |
|
ServiceUnavailable |
string |
|
Unauthorized |
string |
TranslationErrorResponse
Contains unified error information used for HTTP responses across any Cognitive Service. Instances can be created either through Microsoft.CloudAI.Containers.HttpStatusExceptionV2 or by returning it directly from a controller.
Name | Type | Description |
---|---|---|
error |
This contains an outer error with error code, message, details, target and an inner error with more descriptive details. |