Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: luhuayi <luhuayi@huawei.com> Co-committed-by: luhuayi <luhuayi@huawei.com>
16 KiB
Querying Cluster Task Details
Function
This API is used to query cluster task details.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/clusters/{cluster_id}/actions/{action_name}
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
cluster_id |
Yes |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints N/A Range N/A Default Value N/A |
action_name |
Yes |
String |
Definition Task name. Only some ongoing tasks can be viewed. Constraints N/A Range GROWING, RESIZE_FAILURE, RESTORING, RESTORING_FAILED, SNAPSHOTTING, SNAPSHOTTING_FAILED, FINE_GRAINED_RESTORING, or FINE_GRAINED_RESTORING_FAILED Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
id |
String |
Definition Response body for querying task details. Range Randomly generated UUID. |
action_name |
String |
Definition Task name, which is the same as the input parameter. Range N/A |
status |
String |
Definition Task status. Range N/A |
cluster_name |
String |
Definition Cluster name. Range N/A |
submit_time |
String |
Definition Time when the task is submitted. Range N/A |
items |
Array of ActionItemVo objects |
Definition Task subitems. Range N/A |
Parameter |
Type |
Description |
|---|---|---|
item_name |
String |
Definition First-level menu, which is a task subitem. Range N/A |
sub_items |
Array of ActionSubItemVo objects |
Definition Details of the first-level menu (a task subitem). Range N/A |
Parameter |
Type |
Description |
|---|---|---|
status |
String |
Definition Status. Range N/A |
detail |
String |
Definition Extended information. Range N/A |
sub_item_name |
String |
Definition Subitem name, which is returned in Chinese or English based on the x-language field in the request header. Range N/A |
begin_time |
String |
Definition Start time. Range A specific time format or null. |
end_time |
String |
Definition End time. Range A specific time format or null. |
estimated_time |
Integer |
Definition Estimated time. Range An integer. |
Example Requests
Query details about the failed snapshot task.
get https://{Endpoint}/v1/05f2cff45100d5112f4bc00b794ea08e/clusters/9f76c502-fc9c-4a52-8656-65d0da6e3d57/actions/SNAPSHOTTING_FAILED
Example Responses
Status code: 200
Query succeeded.
{
"id" : "abb30649-4ab5-448f-a199-f764d2a4271d",
"status" : "FAILED",
"items" : [ {
"item_name" : "Create a snapshot",
"sub_items" : [ {
"status" : "FAILED",
"detail" : "{\"progressInfo\":\"{\\\"actionEndTime\\\":\\\"2025-05-19 09:07:42\\\",\\\"failedStep\\\":\\\"INIT\\\",\\\"partialPassKeys\\\":\\\"N/A\\\",\\\"errorCode\\\":\\\"\\\",\\\"updateTime\\\":\\\"2025-05-19 09:07:43\\\",\\\"errorMsg\\\":\\\"host-172-16-13-211 SUCCESS host-172-16-47-24 SUCCESS host-172-16-19-132 SUCCESS \\\",\\\"backupSize\\\":157661926,\\\"backupRate\\\":{\\\"compressRate\\\":\\\"0MB/s\\\",\\\"consumerRate\\\":\\\"0MB/s\\\",\\\"producerRate\\\":\\\"0MB/s\\\"},\\\"currentStep\\\":\\\"FINISH\\\",\\\"actionType\\\":\\\"Backup\\\",\\\"unrestoreKeys\\\":\\\"N/A\\\",\\\"progress\\\":\\\"100.00%\\\",\\\"actionStartTime\\\":\\\"2025-05-19 09:07:28\\\",\\\"priorKey\\\":\\\"N/A\\\",\\\"key\\\":\\\"20250519_090729\\\"}\"}",
"sub_item_name" : "Perform a backup",
"begin_time" : "2025-05-19 09:06:18.0",
"end_time" : null,
"estimated_time" : -1
} ]
} ],
"action_name" : "SNAPSHOTTING_FAILED",
"cluster_name" : "cluster_779",
"submit_time" : "2025-05-19 09:05:10.0"
}
Status Codes
Status Code |
Description |
|---|---|
200 |
Query succeeded. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
500 |
Internal server error. |
503 |
Service unavailable. |