Task Related Interfaces
Updated at:2025-10-27
Get the task list
Description
Get the task list
Request structure
Plain Text
1GET /v2/tasks/{taskType} HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| taskType | String | Yes | URL parameter | Task type, now only supporting [InstanceGroupReplicas] |
| targetID | String | Yes | Query | Task target object ID. For InstanceGroupReplicas task type, targetID is the target node group ID |
| operationType | String | No | Query | Operation type, now supporting [ScalingUp, ScalingDown, Repair, ExistedScaleup]. ScalingUp represents scale-up, ScalingDown represents scale-down, Repair represents scaling process of modifying the expected number of nodes, and ExistedScaleup represents adding existing nodes to the node group. |
| phase | String | No | Query | Task status, now supporting [Pending, Processing, Done, Aborted, Collecting] |
| order | String | No | Query | Sorting method, now supporting [ASC,DESC], defaulting to DESC (descending). ASC is valid when orderBy is non-null. |
| orderBy | String | No | Query | Sorting field, now only supporting [startTime], defaulting to startTime (creation time) |
| pageNo | Integer | No | Query | Specifies the page number for the query. When set to 0, pagination is disabled. |
| pageSize | Integer | No | Query | Specifies the number of results per page for the query. When set to 0, pagination is disabled. |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| page | [ListTaskPage](CCE/API_V2 Reference/Appendix.md#ListTaskPage) | Task query result page |
| requestID | String | Request ID. This ID is provided for issue localization. |
Request example
Plain Text
1GET /api/cce/service/v2/tasks/InstanceGroupReplicas?targetID=cce-ig-h5zc8dqu&pageNo=1&pageSize=2 HTTP/1.1
2Host: cce.bj.baidubce.com
3Content-Type: application/json
4Authorization: authorization string
Response example
Plain Text
1{
2 "requestID": "dc172e92-67b1-4697-97f7-ded9cccfa455",
3 "Page": {
4 "pageNo": 1,
5 "pageSize": 2,
6 "totalCount": 5,
7 "items": [
8 {
9 "id": "task-cce-ig-h5zc8dqu-scaleupexist-2w2snkxf",
10 "type": "InstanceGroupReplicas",
11 "description": "attach 4 instances to instancegroup",
12 "startTime": "2025-04-11T11:39:40Z",
13 "finishTime": "2025-04-11T11:47:09Z",
14 "phase": "Done",
15 "processes": [
16 {
17 "name": "MoveExistedInstanceIntoInstanceGroup",
18 "phase": "Done",
19 "startTime": "2025-04-11T19:39:41+08:00",
20 "finishTime": "2025-04-11T19:47:09+08:00",
21 "metrics": {
22 "cce-fm8eewfh-5v7gw5g2": "create_failed",
23 "cce-fm8eewfh-iw5kw5pu": "running",
24 "cce-fm8eewfh-l3f4lsbd": "running",
25 "cce-fm8eewfh-obgcevn2": "running"
26 }
27 }
28 ]
29 },
30 {
31 "id": "task-cce-ig-h5zc8dqu-scaledown-9xejb2fj",
32 "type": "InstanceGroupReplicas",
33 "description": "remove specified instances from instance group",
34 "startTime": "2025-04-11T11:32:56Z",
35 "finishTime": "2025-04-11T11:37:10Z",
36 "phase": "Done",
37 "processes": [
38 {
39 "name": "RemoveInstancesFromInstanceGroup",
40 "phase": "Done",
41 "startTime": "2025-04-11T19:32:56+08:00",
42 "finishTime": "2025-04-11T19:37:10+08:00",
43 "metrics": {
44 "cce-fm8eewfh-60cyxs3v": "Succeed",
45 "cce-fm8eewfh-djzjnidb": "Succeed",
46 "cce-fm8eewfh-nom6v0on": "Succeed",
47 "cce-fm8eewfh-qbdqj6aj": "Succeed"
48 }
49 }
50 ]
51 }
52 ]
53 }
54}
View task details
Description
View task details
Request structure
Plain Text
1GET /v2/task/{taskType}/{taskID} HTTP/1.1
2Host: cce.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| taskType | String | Yes | URL parameter | Task type, now only supporting [InstanceGroupReplicas] |
| taskID | String | Yes | URL parameter | Task ID |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| task | [Task](CCE/API_V2 Reference/Appendix.md#Task) | Task details |
| requestID | String | Request ID. This ID is provided for issue localization. |
Request example
Plain Text
1GET /api/cce/service/v2/task/InstanceGroupReplicas/task-cce-ig-h5zc8dqu-scaleupexist-2w2snkxf~~~~ HTTP/1.1
2Host: cce.bj.baidubce.com
3Content-Type: application/json
4Authorization: authorization string
Response example
Plain Text
1{
2 "requestID": "58731113-1d37-49e8-8644-afbc55cee5ef",
3 "task": {
4 "id": "task-cce-ig-h5zc8dqu-scaleupexist-2w2snkxf",
5 "type": "InstanceGroupReplicas",
6 "description": "attach 4 instances to instancegroup",
7 "startTime": "2025-04-11T11:39:40Z",
8 "finishTime": "2025-04-11T11:47:09Z",
9 "phase": "Done",
10 "processes": [
11 {
12 "name": "MoveExistedInstanceIntoInstanceGroup",
13 "phase": "Done",
14 "startTime": "2025-04-11T19:39:41+08:00",
15 "finishTime": "2025-04-11T19:47:09+08:00",
16 "metrics": {
17 "cce-fm8eewfh-5v7gw5g2": "create_failed",
18 "cce-fm8eewfh-iw5kw5pu": "running",
19 "cce-fm8eewfh-l3f4lsbd": "running",
20 "cce-fm8eewfh-obgcevn2": "running"
21 }
22 }
23 ]
24 }
25}
