GetServiceTask
Queries the details of a single service task under a specified application.
Operation description
Queries the details of a single service task based on the task ID. The response content varies depending on the task type. For heapdump, the response returns heap dump task information. For LiveDebug, the response returns task records and fields such as taskConfig (extraInfo).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:GetServiceTask |
get |
*Service
|
None | None |
Request syntax
GET /serviceTask/{workspace}/{serviceId}/task/{taskId} 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 ID of the application or service (pid). |
ggxw4lnjuz@f2fd3a6265a254a052afb |
| taskId |
string |
No |
The task ID. |
a1b2c3d4-e5f6-7890-abcd-ef1234567890 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| type |
string |
No |
The task type. This parameter is required. 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), and LiveDebug hot code replacement (live_debug_code_replace). The value must be the same as the type specified when the task was created. |
live_debug_log_probe |
Path parameters include workspace, serviceId, and taskId. The query parameter type is required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The successful query response. |
||
| requestId |
string |
The request ID. |
A1B2C3D4-E5F6-7890-ABCD-EF1234567890 |
| serviceTask |
object |
The task details object. Common fields include taskId, serviceId, workspace, regionId, ip, taskType, extraInfo (taskConfig JSON for LiveDebug), createTime, and updateTime. |
{"taskId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","serviceId":"ggxw4lnjuz@f2fd3a6265a254a052afb","taskType":"live_debug_log_probe","ip":"10.0.0.1","extraInfo":"{\"probeType\":\"LOG\",\"language\":\"java\"}"} |
The response includes the requestId and the serviceTask object.
Examples
Success response
JSON format
{
"requestId": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
"serviceTask": {
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"serviceId": "ggxw4lnjuz@f2fd3a6265a254a052afb",
"taskType": "live_debug_log_probe",
"ip": "10.0.0.1",
"extraInfo": "{\"probeType\":\"LOG\",\"language\":\"java\"}"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.