import requests
url = "https://platform.ankra.app/api/v1/org/organisation/audit-logs/clusters"
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/organisation/audit-logs/clusters', 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/organisation/audit-logs/clusters \
--header 'Authorization: Bearer <token>'{
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_deleted": true,
"name": "<string>"
}
],
"truncated": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}List the clusters the audit log can be narrowed to with an API token
Bearer twin of GET /org/organisation/audit-logs/clusters: the clusters the organisation audit log can be filtered by, live ones first and then by name, at most 500. Clusters that were deleted are included and flagged, because their audit rows outlive them. The token (its scopes and its role) must hold audit.read in the organisation. The organisation is the token’s own, or the one named by the X-Ankra-Organisation-Id header when the token’s user is a member of it; a service-account token cannot leave its organisation. The audit trail belongs to the whole organisation: audit.read cannot be held through a project, so a project-only member’s token is refused, and a token pinned to a project is refused with 403 whatever its holder’s role.
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/audit-logs/clusters"
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/organisation/audit-logs/clusters', 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/organisation/audit-logs/clusters \
--header 'Authorization: Bearer <token>'{
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_deleted": true,
"name": "<string>"
}
],
"truncated": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.