DescribeTaskLogs

Last updated: 2019-12-05 16:08:53

1. API Description

Domain name for API request: batch.tencentcloudapi.com.

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.

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 Getting Job Log Details

Input Example

https://batch.tencentcloudapi.com/?Action=DescribeTaskLogs
&JobId=job-mawzp3ja
&TaskName=task
&TaskInstanceIndexes.0=0
&TaskInstanceIndexes.1=1
&<Common request parameter>

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

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

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 Invalid 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 mistake.