tencent cloud

文档反馈

DescribeTaskLogs

最后更新时间:2023-05-04 15:47:08

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.

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 Params. The value used for this API: DescribeTaskLogs.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region No String Common Params. This parameter is not required for this API.
JobId Yes String Job ID
TaskName Yes String Task name
TaskInstanceIndexes.N No Array of Integer Set of task instances
Offset No Integer The start point of query
Limit No Integer Maximum number of task instances returned

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

https://batch.tencentcloudapi.com/?Action=DescribeTaskLogs
&JobId=job-mawzp3ja
&TaskName=task
&TaskInstanceIndexes.0=0
&TaskInstanceIndexes.1=1
&<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

SDK

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 job ID format.
InvalidParameter.TaskName Invalid task name.
InvalidParameter.TaskNameTooLong The task name is too long.
InvalidParameterValue Incorrect parameter value.
InvalidParameterValue.Negative Invalid negative parameter.
ResourceNotFound.Job The specified job does not exist.
ResourceNotFound.Task The specified job task does not exist.
ResourceNotFound.TaskInstance The specified task instance does not exist.
UnknownParameter Unknown parameter error.