List state snapshots of a DigitalOcean cluster
import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/state-snapshots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/state-snapshots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/state-snapshots \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshots": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "<string>",
"trigger_description": "<string>",
"status": "capturing",
"distribution": "<string>",
"kube_version": "<string>",
"target_kube_version": "<string>",
"verification": "verified",
"created_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"restored_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"size_bytes": 123,
"restorable": true,
"not_restorable_reason": "<string>",
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vault": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"ownership": "organisation"
}
}
],
"limit": 123,
"truncated": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}DigitalOcean Clusters
List state snapshots of a DigitalOcean cluster
Every state snapshot (an encrypted etcd snapshot) of the DigitalOcean cluster, newest first: its id, what triggered it, its status, the Kubernetes version it holds, when it was captured, its size, whether the capture was read back from the backup vault (verification), and whether a start can restore it when named as restore_snapshot_id (restorable, with not_restorable_reason). At most limit snapshots are listed; truncated is true when older ones were left out. The answer never carries an object key, bucket or secret path, and names a backup vault only when the caller can see it.
GET
/
api
/
v1
/
clusters
/
digitalocean
/
{cluster_id}
/
state-snapshots
List state snapshots of a DigitalOcean cluster
import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/state-snapshots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/state-snapshots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/state-snapshots \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshots": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "<string>",
"trigger_description": "<string>",
"status": "capturing",
"distribution": "<string>",
"kube_version": "<string>",
"target_kube_version": "<string>",
"verification": "verified",
"created_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"restored_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"size_bytes": 123,
"restorable": true,
"not_restorable_reason": "<string>",
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vault": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"ownership": "organisation"
}
}
],
"limit": 123,
"truncated": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}