ListServiceTask
Lists service tasks.
Operation description
Lists service tasks under an application by task type.
type=heapdump: returns a list of heap dump tasks.
type=pprof: returns a list of pprof dumps (requires searchCondition).
type=live_debug_*: returns a list of corresponding LiveDebug tasks.
Supports pagination with nextToken and maxResults, and filtering with searchCondition.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:ListServiceTask |
list |
*Service
|
None | None |
Request syntax
GET /serviceTask/{workspace}/{serviceId}/tasks HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspace |
string |
Yes |
The name of the workspace. Example: default-cms- |
default-cms-1672753017899339-cn-hangzhou |
| serviceId |
string |
Yes |
The application or service ID (pid). |
ggxw4lnjuz@f2fd3a6265a254a052afb |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| type |
string |
No |
The task type. Valid values: heapdump (heap dump); LiveDebug Probe: live_debug_log_probe, live_debug_snapshot_probe, live_debug_metric_probe, live_debug_span_probe, and live_debug_span_tag_probe; LiveDebug Command: live_debug_inspect_object, live_debug_search_type, live_debug_search_method, live_debug_decompile, live_debug_get_thread_info, live_debug_get_runtime_info, live_debug_get_memory_info, live_debug_evaluate_expression, and live_debug_modify_logger_level; LiveDebug code hot replacement: live_debug_code_replace. The list operation also supports pprof. |
live_debug_log_probe |
| nextToken |
string |
No |
The pagination token. Pass the nextToken value from the previous response as is. You can leave this parameter empty for the first query. The server returns an encrypted hexadecimal string (internal format: {md5}#{dbId}) with a maximum length of 128 characters. |
d23d8f3f0f0cd1984566b1986c9343122fa0385a05c09694c17fe87709f3eb56d1a7ead56b4a2536 |
| maxResults |
integer |
No |
The maximum number of entries to return per page. Valid values: 0 to 100. Default value: 100. |
20 |
| searchCondition |
string |
No |
The search condition. The value is a JSON string with a maximum length of 1,024 characters. For heapdump, you can use this parameter to filter by conditions such as IP address. Example for pprof: {"ip":"10.0.0.1","start":1711843200000,"end":1711846800000,"profileType":1}. |
{"ip":"10.0.0.1"} |
The path parameters workspace and serviceId, and the query parameter type are required. Other parameters are optional.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The successful response. |
||
| requestId |
string |
The request ID. |
A1B2C3D4-E5F6-7890-ABCD-EF1234567890 |
| nextToken |
string |
The token for the next page. An encrypted hexadecimal string is returned if a next page exists. An empty value or the absence of this field indicates that no more data is available. Pass this value as is in the nextToken parameter for the next request. |
d23d8f3f0f0cd1984566b1986c9343122fa0385a05c09694c17fe87709f3eb56d1a7ead56b4a2536 |
| maxResults |
integer |
The maxResults value for the current request. |
20 |
| totalCount |
integer |
The total number of entries that meet the conditions. |
2 |
| serviceTasks |
array<object> |
The list of tasks. |
[{"taskId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","taskType":"live_debug_log_probe"}] |
|
object |
The task object. The fields vary based on the task type. |
{"taskId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","taskType":"live_debug_log_probe"} |
Returns the paginated list serviceTasks, along with nextToken, maxResults, and totalCount.
Examples
Success response
JSON format
{
"requestId": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
"nextToken": "d23d8f3f0f0cd1984566b1986c9343122fa0385a05c09694c17fe87709f3eb56d1a7ead56b4a2536",
"maxResults": 20,
"totalCount": 2,
"serviceTasks": [
{
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"taskType": "live_debug_log_probe"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.