Set what a cluster is called and what it is for
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/environment"
payload = { "environment": "<string>" }
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({environment: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/environment', 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}/environment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"environment": "<string>"
}
'{
"criticality": "production",
"environment": "<string>"
}{
"detail": "Cluster not found"
}Imported Clusters
Set what a cluster is called and what it is for
The bearer twin of the portal’s environment control (ankra cluster update --environment): sets the environment label and, when the body carries one, the criticality that decides how loudly the cluster reports, in a single transaction. A body without a criticality leaves the stored one untouched and answers with the environment alone. An ImportCluster file’s metadata.environment is applied only when the import creates the cluster, so this is how a cluster moves between environments afterwards. Requires clusters.write at the cluster.
PATCH
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
environment
Set what a cluster is called and what it is for
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/environment"
payload = { "environment": "<string>" }
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({environment: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/environment', 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}/environment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"environment": "<string>"
}
'{
"criticality": "production",
"environment": "<string>"
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json