Last updated: 2021-01-28 19:55:24

1. API Description

Domain name for API request:

This API is used to get the standard outputs and standard error logs of multiple task instances.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeTaskLogs.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
JobId Yes String Instance ID
TaskName Yes String Job name
TaskInstanceIndexes.N No Array of Integer Set of task instances
Offset No Integer Starting task instance
Limit No Integer Maximum number of task instances

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Total number of task instances
TaskInstanceLogSet Array of TaskInstanceLog Set of task instance log details
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Obtaining task log details

Input Example
&<Common request parameters>

Output Example

  "Response": {
    "TotalCount": 1,
    "TaskInstanceLogSet": [
        "StdoutLog": "data:text/plain;charset=utf-8;base64,bWFpbgpbJ2RlbW8ucHknLCAnMycsICcvbW50L2lucHV0JywgJy9tbnQvb3V0cHV0JywgJzEnXWZsdXNoIHRvIC9tbnQvb3V0cHV0LzE1MzU3MjYwMDQuOTEKZmx1c2ggdG8gL21udC9vdXRwdXQvMTUzNTcyNjAwNi4zOQpmbHVzaCB0byAvbW50L291dHB1dC8xNTM1NzI2MDA3LjcK",
        "TaskInstanceIndex": 0,
        "StderrLog": "data:text/plain;charset=utf-8;base64,Zmx1c2ggdG8gL21udC9vdXRwdXQvMTUzNTcyNjAwNC45MQpmbHVzaCB0byAvbW50L291dHB1dC8xNTM1NzI2MDA2LjM5CmZsdXNoIHRvIC9tbnQvb3V0cHV0LzE1MzU3MjYwMDcuNwo=",
        "StdoutRedirectPath": "",
        "StderrRedirectPath": "",
        "StdoutRedirectFileName": "",
        "StderrRedirectFileName": ""
    "RequestId": "3b1ba3bf-a315-42ec-9e8e-af8def768f8a"

5. Developer Resources


TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError Internal error.
InvalidParameter.JobIdMalformed Invalid instance ID format.
InvalidParameter.TaskName Invalid job name.
InvalidParameter.TaskNameTooLong The task name is too long.
InvalidParameterValue Incorrect parameter value.
InvalidParameterValue.Negative Invalid negative parameter.
ResourceNotFound.Job The specified instance does not exist.
ResourceNotFound.Task The specified job task does not exist.
ResourceNotFound.TaskInstance The specified task instance does not exist.
UnknownParameter Unknown parameter.