tencent cloud

GetTaskInstanceLog
Last updated:2025-11-13 20:54:33
GetTaskInstanceLog
Last updated: 2025-11-13 20:54:33

1. API Description

Domain name for API request: wedata.intl.tencentcloudapi.com.

This API is used to obtain instance lists.

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: GetTaskInstanceLog.
Version Yes String Common Params. The value used for this API: 2025-08-06.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
ProjectId Yes String Project ID. specifies the project ID.
InstanceKey Yes String Instance unique id.
LifeRoundNum No Integer Instance Lifecycle Number - Identifies a specific execution of an instance.
For example: the first run of a cyclic instance has a lifecycle number of 0. If the user reruns that instance later, the second execution will have a lifecycle number of 1;
By default, the latest execution is used.
LogLevel No String Log level default All - Info - Debug - Warn - Error - All.
NextCursor No String Used when performing paginated log queries; has no specific business meaning.

For the first query, the value is null.

For subsequent queries, use the value of the NextCursor field returned from the previous query.

3. Output Parameters

Parameter Name Type Description
Data InstanceLog Details of a scheduled instance.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Retrieving the Log of a Task Instance

This example shows you how to include logs and execute code.

Input Example

POST / HTTP/1.1
Host: wedata.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetTaskInstanceLog
<Common request parameters>

{
    "ProjectId": "2428908825624145920",
    "InstanceKey": "20250619121143818_2025-08-28 12:55:00"
}

Output Example

{
    "Response": {
        "Data": {
            "CodeContent": "set tez.queue.name=default;<br>set mapreduce.job.queuename=default;<br>set tez.job.name=job_20250619121143818_20250828125500;<br>set mapred.job.name=job_20250619121143818_20250828125500;<br>show tables;",
            "InstanceKey": "20250619121143818_2025-08-28 12:55:00",
"LogInfo": "2025-08-28 15:04:17 DEBUG the customize_settings file exists in /data/execute_worker/conf/runner_customize.properties<br>2025-08-28 15:04:17 DEBUG runner.language:null<br>2025-08-28 15:04:17 DEBUG init messageSource<br>2025-08-28 15:04:17 DEBUG load guldan_runner_messages<br>2025-08-28 15:04:17 INFO Step 1, execute"
            "NextCursor": "26783",
            "ProjectId": "2428908825624145920"
        },
        "RequestId": "54a7181f-7ab6-4f8e-a630-d1cbe88f2230"
    }
}

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
FailedOperation Operation failed.
InternalError Internal error.
InvalidParameter Parameter error.
MissingParameter Parameter missing.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback