import requests
url = "https://platform.ankra.app/api/v1/org/credentials/github/{credential_id}/usages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/credentials/github/{credential_id}/usages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/credentials/github/{credential_id}/usages \
--header 'Authorization: Bearer <token>'{
"credential": {},
"ambiguous_credential_name": true,
"usage_count": 123,
"application_count": 123,
"dependent_count": 123,
"usages": [
{}
],
"applications": [
{}
]
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List what uses a GitHub credential
Lists the cluster GitOps connections and the applications that depend on a GitHub credential, with the counts to weigh before replacing or deleting it. The credential must belong to the caller’s organisation, and a personal credential must be the caller’s own; any other id answers 404. Requires credentials.read.
import requests
url = "https://platform.ankra.app/api/v1/org/credentials/github/{credential_id}/usages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/credentials/github/{credential_id}/usages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/credentials/github/{credential_id}/usages \
--header 'Authorization: Bearer <token>'{
"credential": {},
"ambiguous_credential_name": true,
"usage_count": 123,
"application_count": 123,
"dependent_count": 123,
"usages": [
{}
],
"applications": [
{}
]
}{
"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
Response
Usages resolved
The credential: id, name, provider, credential_scope (organisation or personal), state, available, account_login, account_type, installation_id, app_backed, last_synced_at and syncing.
True when more than one active GitHub credential carries this name; the usages then span all of them.
Cluster GitOps connections that name the credential.
Applications built from repositories the credential grants.
usage_count plus application_count: what to weigh before replacing or deleting the credential.