ListServiceTask

Updated at:

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cms:ListServiceTask

list

*Service

acs:cms:{#regionId}:{#accountId}:serviceTask/{#Workspace}/{#serviceId}/tasks

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.