Delete a credential
import requests
url = "https://platform.ankra.app/api/v1/org/credentials/{credential_id}"
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/credentials/{credential_id}', 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/credentials/{credential_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Credentials
Delete a credential
Deletes a credential. A credential a cluster still uses is refused with 409, and a Git credential a cluster’s GitOps binding still names can be refused unless replacement_credential_id re-points those bindings in the same delete. Requires credentials.delete.
DELETE
/
api
/
v1
/
org
/
credentials
/
{credential_id}
Delete a credential
import requests
url = "https://platform.ankra.app/api/v1/org/credentials/{credential_id}"
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/credentials/{credential_id}', 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/credentials/{credential_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Re-point every cluster GitOps binding that references this git credential to the named replacement credential, in the delete's own transaction. Without it, deleting the last credential such a binding references is refused with 409 while GITOPS_CREDENTIAL_INTEGRITY_ENFORCE is on.
Response
Credential deleted successfully