Document Translation - Get Translation Status
Returns the status for a document translation request. The status includes the overall request status, as well as the status for documents that are being translated as part of that request.
GET {endpoint}/translator/text/batch/v1.0/batches/{id}
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). |
id
|
path | True |
string (uuid) |
Format - uuid. The operation id |
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 |
Successful request and returns the status of the batch translation operation Headers
|
|
401 Unauthorized |
Unauthorized. Please check your credentials |
|
404 Not Found |
Resource is not found |
|
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 Batch Operation Status
Sample request
GET {endpoint}/translator/text/batch/v1.0/batches/727BF148-F327-47A0-9481-ABAE6362F11E
Sample response
{
"error": {
"code": "Unauthorized",
"message": "User is not authorized",
"target": "Operation",
"innerError": {
"code": "Unauthorized",
"message": "Operation is not authorized"
}
}
}
{
"error": {
"code": "RequestRateTooHigh",
"message": "User's request rate is too high",
"target": "Operation",
"innerError": {
"code": "RateTooHigh",
"message": "Request rate is too high"
}
}
}
{
"error": {
"code": "InternalServerError",
"message": "Internal Server Error",
"target": "Operation",
"innerError": {
"code": "InternalServerError",
"message": "Unexpected internal server error has occurred"
}
}
}
{
"error": {
"code": "ServiceUnavailable",
"message": "Service is temporary unavailable",
"target": "Operation",
"innerError": {
"code": "ServiceTemporaryUnavailable",
"message": "Service is currently unavailable. Please try again later"
}
}
}
{
"error": {
"code": "ResourceNotFound",
"message": "id not found",
"target": "Operation",
"innerError": {
"code": "ResourceNotFound",
"message": "Resource requested is not found"
}
}
}
retry-after: 30
ETag: 686897696a7c876b7e
{
"id": "727bf148-f327-47a0-9481-abae6362f11e",
"createdDateTimeUtc": "2020-03-26T00:00:00Z",
"lastActionDateTimeUtc": "2020-03-26T01:00:00Z",
"status": "Succeeded",
"summary": {
"total": 10,
"failed": 1,
"success": 9,
"inProgress": 0,
"notYetStarted": 0,
"cancelled": 0,
"totalCharacterCharged": 0
}
}
Definitions
Name | Description |
---|---|
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). |
Status |
List of possible statuses for job or document |
Status |
|
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. |
Translation |
Translation job status response |
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. |
Status
List of possible statuses for job or document
Value | Description |
---|---|
NotStarted | |
Running | |
Succeeded | |
Failed | |
Cancelled | |
Cancelling | |
ValidationFailed |
StatusSummary
Name | Type | Description |
---|---|---|
cancelled |
integer (int32) |
Number of cancelled |
failed |
integer (int32) |
Failed count |
inProgress |
integer (int32) |
Number of in progress |
notYetStarted |
integer (int32) |
Count of not yet started |
success |
integer (int32) |
Number of Success |
total |
integer (int32) |
Total count |
totalCharacterCharged |
integer (int64) |
Total characters charged by the API |
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.
Value | Description |
---|---|
InvalidRequest | |
InvalidArgument | |
InternalServerError | |
ServiceUnavailable | |
ResourceNotFound | |
Unauthorized | |
RequestRateTooHigh |
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. |
TranslationStatus
Translation job status response
Name | Type | Description |
---|---|---|
createdDateTimeUtc |
string (date-time) |
Operation created date time |
error |
This contains an outer error with error code, message, details, target and an inner error with more descriptive details. |
|
id |
string (uuid) |
Id of the operation. |
lastActionDateTimeUtc |
string (date-time) |
Date time in which the operation's status has been updated |
status |
List of possible statuses for job or document |
|
summary |