content/operate/rs/references/rest-api/requests/nodes/snapshots.md
| Method | Path | Description |
|---|---|---|
| GET | /v1/nodes/{uid}/snapshots | Get node snapshots |
| DELETE | /v1/nodes/{uid}/snapshots/{snapshot_name} | Delete a node snapshot |
GET /v1/nodes/{int: uid}/snapshots
Get all cluster node snapshots of the specified node.
| Permission name | Roles |
|---|---|
| [view_node_info]({{< relref "/operate/rs/references/rest-api/permissions#view_node_info" >}}) | admin |
| cluster_member | |
| cluster_viewer | |
| db_member | |
| db_viewer | |
| user_manager |
GET /v1/nodes/1/snapshots
| Key | Value | Description |
|---|---|---|
| Host | cnm.cluster.fqdn | Domain name |
| Accept | application/json | Accepted media type |
| Field | Type | Description |
|---|---|---|
| uid | integer | The unique ID of the node requested. |
Returns an array of node snapshot JSON objects.
[
{
"created_time": "2024-01-10 20:55:54",
"name": "nightly_snapshot_1",
"node_uid": "1"
},
{
"created_time": "2024-01-11 20:55:54",
"name": "nightly_snapshot_2",
"node_uid": "1"
}
]
| Code | Description |
|---|---|
| 200 OK | No error |
| 404 Not Found | Node UID does not exist |
DELETE /v1/nodes/{int: uid}/snapshots/{snapshot_name}
Delete a cluster node snapshot. Snapshots created by maintenance mode are not deleted.
| Permission name | Roles |
|---|---|
| [update_node]({{< relref "/operate/rs/references/rest-api/permissions#update_node" >}}) | admin |
DELETE /v1/nodes/1/snapshots/nightly_snapshot_19
| Key | Value | Description |
|---|---|---|
| Host | cluster.fqdn | Domain name |
| Accept | application/json | Accepted media type |
| Field | Type | Description |
|---|---|---|
| uid | integer | The unique ID of the updated node. |
| snapshot_name | string | The unique name of the snapshot to delete. |
Returns a JSON object that represents the deleted node snapshot.
{
"created_time": "2024-01-11 20:55:54",
"name": "nightly_snapshot_19",
"node_uid": "1"
}
| Code | Description |
|---|---|
| 200 OK | No error |
| 403 Forbidden | Node snapshot is a maintenance snapshot and cannot be deleted |
| 404 Not Found | Node uid does not exist |
| 404 Not Found | Snapshot name does not exist for this node uid |