Remove the cluster metrics source
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/metrics-source"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/metrics-source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/metrics-source \
--header 'Authorization: Bearer <token>'{
"marked_for_deletion_at": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Imported Clusters
Remove the cluster metrics source
The bearer twin of the portal’s metrics source removal, for the Ankra app and scripts. Removes the cluster’s metrics source; its stored credentials stay until deleted. Requires clusters.write on the cluster.
DELETE
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
metrics-source
Remove the cluster metrics source
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/metrics-source"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/metrics-source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/metrics-source \
--header 'Authorization: Bearer <token>'{
"marked_for_deletion_at": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}