Help Center/ Cloud Container Engine/ API Reference/ APIs/ Cluster Upgrade/ Obtaining a List of Cluster Backup Task Details
Updated on 2024-04-23 GMT+08:00

Obtaining a List of Cluster Backup Task Details

Function

Obtain a list of cluster backup task details.

URI

GET /api/v3.1/projects/{project_id}/clusters/{cluster_id}/operation/snapshot/tasks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

cluster_id

Yes

String

Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

API version, which defaults to v3.1

kind

String

Task type

metadata

SnapshotTaskMetadata object

Backup metadata

items

Array of SnapshotTask objects

Backup tasks

status

SnapshotTaskStatus object

Backup task status

Table 3 SnapshotTask

Parameter

Type

Description

kind

String

Task type

apiVersion

String

API version

metadata

SnapshotTaskMetadata object

Backup metadata

spec

SnapshotSpec object

Backing Up Task Configurations (To Be Deprecated)

status

SnapshotStatus object

Backup task status

Table 4 SnapshotTaskMetadata

Parameter

Type

Description

uid

String

Task ID

creationTimestamp

String

Time when the task was created

updateTimestamp

String

Time when the task was updated

Table 5 SnapshotSpec

Parameter

Type

Description

items

Array of SnapshotSpecItems objects

Backup task details

Table 6 SnapshotSpecItems

Parameter

Type

Description

id

String

Subtask ID

type

String

Subtask type

status

String

Status

creationTimestamp

String

Time when the task was created

updateTimestamp

String

Time when the task was updated

message

String

Information

Table 7 SnapshotStatus

Parameter

Type

Description

phase

String

Task status

progress

String

Task progress

completionTime

String

Completion time

Table 8 SnapshotTaskStatus

Parameter

Type

Description

latestBackupTime

String

Time of the latest backup

Example Requests

None

Example Responses

Status code: 200

The list of cluster backup task details is obtained.

{
  "kind" : "List",
  "apiVersion" : "v3.1",
  "metadata" : { },
  "items" : [ {
    "kind" : "SnapshotTask",
    "apiVersion" : "v3.1",
    "metadata" : {
      "uid" : "87d326f9-46b0-486e-a4ba-1f82ec9315ed",
      "creationTimestamp" : "2023-11-25 17:03:46.739012 +0800 CST",
      "updateTimestamp" : "2023-11-25 17:03:46.739027 +0800 CST"
    },
    "spec" : { },
    "status" : {
      "phase" : "Running",
      "progress" : "67",
      "completionTime" : "2023-11-25 17:03:46.739027 +0800 CST"
    }
  } ],
  "status" : {
    "latestBackupTime" : "2023-11-25 17:03:47.980844 +0800 CST"
  }
}

Status Codes

Status Code

Description

200

The list of cluster backup task details is obtained.

Error Codes

See Error Codes.