Delete the cluster metrics source credential
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/prometheus-credential/{credential_name}"
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}/prometheus-credential/{credential_name}', 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}/prometheus-credential/{credential_name} \
--header 'Authorization: Bearer <token>'{
"name": "<string>",
"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
Delete the cluster metrics source credential
The bearer twin of the portal’s metrics credential removal, for the Ankra app and scripts. Deletes one stored metrics source credential of the cluster, from the platform and from Vault. Replace a credential by deleting it first and then saving the source with the new one. Requires clusters.write on the cluster.
DELETE
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
prometheus-credential
/
{credential_name}
Delete the cluster metrics source credential
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/prometheus-credential/{credential_name}"
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}/prometheus-credential/{credential_name}', 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}/prometheus-credential/{credential_name} \
--header 'Authorization: Bearer <token>'{
"name": "<string>",
"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"
}