Skip to main content

GetDocTranslateTask

Gets the results of a document translation task from Tongyi Multimodal Translation.

Operation description

API for querying the results of document translation tasks.

Debug

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Debug

Authorization information

The following table describes the authorization information for this API. You can use it in the Action element of a RAM permission policy statement to grant a RAM user or RAM role the permission to call this API. For more information, see the following:
  • Action: the specific permission point.
  • Access level: the access level of each operation. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization for the operation. For more information, see the following:
    • Required resource types are marked with a leading asterisk (*).
    • For operations that do not support resource-level authorization, All Resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent action
anytrans:GetDocTranslateTasknone
*All Resources
*
    None
None

Request syntax

POST /anytrans/translate/doc/get HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample
workspaceIdstringYes

The ID of the Model Studio workspace used for the current request.

llm-kqtrcpdee4xm29xx
taskIdstringYes

The document translation task ID.

d3a2397bc2c14ab4a2e40a4f5b46241b

Response elements

ElementTypeDescriptionExample
object

Schema of Response

codestring

The response status code.

success
messagestring

The response message.

success
requestIdstring

The request ID, used to trace the API call chain.

AC642EEB-C29D-54DF-8F52-622565BBB78A
successboolean

Indicates whether the API call was successful.

true
httpStatusCodestring

The HTTP response code.

200
dataobject

The response data.

taskIdstring

The document translation task ID.

d3a2397bc2c14ab4a2e40a4f5b46241b
statusstring

The translation status.

Valid values:
  • translating: translating.
  • translated: translation completed.
translated
charactersCountinteger

The character count.

4
pageCountinteger

The page count.

2
translateFileUrlstring

The translation result URL.

http://translate-ai-data-dev.oss-cn-hangzhou.aliyuncs.com/tongyiTranslate/123456789/a7630164ce894c799cca0f0822c36f84_merge.md

Examples

Success response JSON format
{
  "code": "success",
  "message": "success",
  "requestId": "AC642EEB-C29D-54DF-8F52-622565BBB78A",
  "success": true,
  "httpStatusCode": 200,
  "data": {
    "taskId": "d3a2397bc2c14ab4a2e40a4f5b46241b",
    "status": "translated",
    "charactersCount": 4,
    "pageCount": 2,
    "translateFileUrl": "http://translate-ai-data-dev.oss-cn-hangzhou.aliyuncs.com/tongyiTranslate/123456789/a7630164ce894c799cca0f0822c36f84_merge.md"
  }
}

Error codes

HTTP status codeError codeError message
400IdempotentParameterMismatchThe request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.
Visit the Error Center to view more error codes.

Release notes

Change timeChange summaryOperation
No change history yet.