You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
SQL analysis API
DescribeScheduleSqlTask
Copy page
Download PDF
DescribeScheduleSqlTask
Call the DescribeScheduleSqlTask API to view details for the specified scheduled SQL analysis task.​
Request instructions​
  • Request method: GET​
  • Request URL: https://{tls-endpoint}/DescribeScheduleSqlTask​
Request parameters​
The table below lists only parameters unique to this API and some common parameters. For more information, see Common Parameters.​
Query​
​
Parameter​
Type​
Required​
Example value​
Description​
TaskId​
String​
Yes​
f3e901c3-b17f-42fd-aa8c-dc91a6c7****​
Scheduled SQL analysis task ID.​
​
Response parameters​
This API does not have specific return parameters. For more information, see Return structure.​
​
Parameter​
Type​
Example value​
Description​
CreateTimeStamp​
Integer​
1689042649​
Creation time of the scheduled SQL analysis task.​
Description​
String​
This is a test schedule sql task​
Brief description of the scheduled SQL analysis task.​
DestProjectID​
String​
c4737fdd-0c72-4c1f-b35e-3ae4a02d\*\*\*\*​
The target log topic that stores the scheduled SQL analysis results belongs to the log project.​
DestRegion​
String​
cn-shanghai​
The region where the target project is located.​
DestTopicID​
String​
66b42cb6-3436-44ae-97bf-efab3043**​
Target log topic ID for storing scheduled SQL analysis result data.​
DestTopicName​
String​
destTopicName​
Name of the destination log topic for storing scheduled SQL analysis result data​
ModifyTimeStamp​
Integer​
1689042649​
Last modified time of the scheduled SQL analysis task.​
ProcessEndTime​
Integer​
1689042649​
End time of the scheduled SQL task Format as a seconds-level timestamp​
ProcessSqlDelay​
Integer​
0​
Delay time for each scheduling. Unit: seconds.​
ProcessStartTime​
Integer​
1689042649​
The start time for scheduling timed SQL tasks, which is the creation time of the first instance. The format is a second-based timestamp.​
ProcessTimeWindow​
String​
@m-m,@m​
SQL time window.​
Query​
String​
*​
Query and analysis statement executed periodically by the scheduled SQL analysis task.​
RequestCycle​
Object of RequestCycle​
{"Type":"Period","Time":1}​
The scheduling interval for timed SQL analysis tasks.​
SourceProjectID​
String​
abd6b3a7-c730-4527-8d5f-e527b381\*\*\*​
The log project ID to which the source log topic belongs.​
SourceProjectName​
String​
projectName​
Name of the project to which the source log topic belongs.​
SourceTopicName​
String​
sourceTopicName​
Name of the source log topic containing the raw logs for scheduled SQL analysis.​
Status​
Integer​
1​
Start the scheduled SQL analysis task immediately after configuring the task.​
  • 0: Disable the task and manually start it later.​
  • 1: Start immediately.​
TaskId​
String​
2de5d435-0480-4139-9c79-b4241e88\*\*\*\*​
Scheduled SQL analysis task ID.​
TaskName​
String​
test2​
Scheduled SQL analysis task name​
SourceTopicID​
String​
66b42cb6-3436-44ae-97bf-efab3043\*\*​
Source log topic ID of the original log for scheduled SQL analysis.​
​
RequestCycle​
​
Parameter​
Type​
Example value​
Description​
Time​
Integer​
10​
The scheduling cycle or the scheduled execution time (minutes from 00:00) must be between 1 and 1440, in minutes.​
Type​
String​
Period​
Scheduling cycle type. Optional values:​
  • Period: Schedule tasks at regular intervals.​
  • Fixed: Schedule tasks at a fixed time each day.​
  • Cron: Use Cron expressions.​
CronTab​
String​
0 18 * * *​
Cron expression, TLS uses the Cron expression to schedule alarm tasks. The smallest unit for a Cron expression is minutes, and it uses a 24-hour format. For example, 0 18 * * * means to execute the alert task once every day at 18:00.​
CronTimeZone​
String​
GMT+0800​
When Type is set to Cron, specify the time zone. See Select Time Zone for a list of common time zones.​
​
Sample request​
​
GET https://{tls-endpoint}/DescribeScheduleSqlTask?&TaskId=f3e901c3-b17f-42fd-aa8c-dc91a6c7**** HTTP/1.1​
Content-Type: application/json​
​
Sample response​
​
HTTP/1.1 200 OK​
Content-Type: application/json; charset=utf-8 ​
{​
"TaskId": "2de5d435-0480-4139-9c79-b4241e88****",​
"TaskName": "test2",​
"Description": "This is a test schedule sql task",​
"SourceProjectID": "abd6b3a7-c730-4527-8d5f-e527b381****",​
"SourceProjectName": "projectName",​
"SourceTopicID": "c5c6b3a7-c730-4527-8d5f-e527b381****",​
"SourceTopicName": "sourceTopicName",​
"DestRegion": "cn-shanghai",​
"DestProjectID": "c4737fdd-0c72-4c1f-b35e-3ae4a02d****",​
"DestTopicID": "66b42cb6-3436-44ae-97bf-efab3043****",​
"DestTopicName": "destTopicName",​
"Status": 1,​
"ProcessStartTime": 1689042649,​
"RequestCycle": {​
"Type": "Period",​
"Time": 1​
},​
"ProcessTimeWindow": "@m-m,@m",​
"CreateTimeStamp": 1689042649,​
"ModifyTimeStamp": 1689042649,​
"Query": "",​
"ProcessSqlDelay": 0​
}​
​
Error Code​
The table below lists error codes related to the API's business logic. For public error codes, refer to the Public error codes documentation.​
​
HTTP status code​
Error Code​
Error message​
Description​
400​
InvalidArgument​
Invalid argument key %s, value %s, please check argument.​
Invalid parameter.​
404​
ScheduleSqlTaskNotExist​
Task %s does not exist.​
Scheduled SQL analysis task does not exist.​
500​
InternalServerError​
We encountered an unexpected server error, please try again later.​
Internal server error.​
​
Last updated: 2025.10.28 18:42:01