import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/state-snapshot-retention"
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/org/clusters/{cluster_id}/state-snapshot-retention', 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/org/clusters/{cluster_id}/state-snapshot-retention \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"retention_days": 30,
"is_default": false,
"default_retention_days": 7,
"minimum_retention_days": 1,
"maximum_retention_days": 90,
"keep_latest": 4
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Get state snapshot retention
The cluster’s retention window for its scheduled etcd backups (ankra cluster state-snapshots retention). Ankra backs up the etcd state of every running cluster it provisions off the control plane, to the organisation’s backup vault, every six hours. It keeps the four newest backups, plus the newest backup of each UTC day for retention_days days, 7 unless a member sets another window between 1 and 90. Whatever the window, Ankra also keeps the newest backup from before the cluster’s last start and its last recovery incidents. Readable by any member of the organisation. Bearer-PAT twin of the browser route of the same name under /org.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/state-snapshot-retention"
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/org/clusters/{cluster_id}/state-snapshot-retention', 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/org/clusters/{cluster_id}/state-snapshot-retention \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"retention_days": 30,
"is_default": false,
"default_retention_days": 7,
"minimum_retention_days": 1,
"maximum_retention_days": 90,
"keep_latest": 4
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Path Parameters
Response
Successful response
A cluster's retention window for its scheduled etcd backups.
The window in effect: the stored value, or the default when none is stored.
True when no window was set for the cluster and the default applies.
The window of a cluster nobody set one for.
The shortest window that may be set.
The longest window that may be set.
How many of the newest scheduled backups are kept whatever their day, on top of the daily ones.