Archive or restore a cluster
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/archive"
payload = { "archived": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({archived: true})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/archive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"archived": true
}
'{
"archived_at": "2023-11-07T05:31:56Z"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Clusters
Archive or restore a cluster
The bearer twin of the portal’s archive toggle, for the Ankra app and scripts. Archives the cluster (archived: true) or restores it (false); an archived cluster leaves the default cluster lists. Answers 400 for a sandbox cluster and 409 while the cluster is being created or deprovisioned. Requires clusters.write on the cluster.
PATCH
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
archive
Archive or restore a cluster
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/archive"
payload = { "archived": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({archived: true})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/archive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"archived": true
}
'{
"archived_at": "2023-11-07T05:31:56Z"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}