Retrieve the task list of the current console
HTTP Request URL: http(s)://api.thingboot.com/{AppID}/task/list/?sign={sign}&ts={ts}
About the sign and ts definition
Or
MQTT Publish Topic: api/{AppID}/task/list
The returned results are also received on the same topic.
Request parameters
GET|POST|JSON methods are all valid
| Name | Required | Type | Description |
|---|---|---|---|
| device | No | string | You can specify devices by providing their IDs, such as 1.
For multiple devices, separate them using a delimiter (, or |), for example, 1,2,3.
If multiple devices are specified, the relationship between them is "OR"; for instance, as shown above, all tasks associated with device 1 and device 2 will be listed. |
| stage | No | string | You can specify the task strategy type by providing the strategy type name, such as loop.
For multiple types, separate them using a delimiter (, or |), for example, loop,datetime.
If multiple types are specified, the relationship between the types is "OR"; for instance, as shown above, all tasks with loop (looping) and datetime (fixed time) strategies will be listed. |
| page_index | No | int | Page number, default 1 |
| page_size | No | int | Default is 10 items, can be set to 20, 30, or 50. |
Return results
| Name | Type | Description |
|---|---|---|
| data | string | Task List:
id: (integer) Task ID
from: (string) Task source: can be console or API
devices: (array of strings) Devices targeted by the task: can be device IDs, group IDs, or tag IDs
stage: (JSON object) Execution policy: policy type and related parameters
run: (JSON object) Execution status: number of executions, last execution time
enable: (integer) (enabled or not): 1 indicates enabled, 0 indicates disabled (not enabled or paused)
title: (string) Task name or remarks/description |
| code | string | Return the status value: 200 indicates success, for other errors please refer to the "Global Error Codes" section on the API homepage. |
| msg | string | Return status information |
| page_index | int | Current page number |
| page_count | int | Total number of pages |
| is_more | int | Is there any more data |
| total | int | Total number of tasks under current conditions |
Return example