List the audit log of one cluster
import requests
url = "https://platform.ankra.app/org/clusters/{cluster_id}/audit-logs"
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/org/clusters/{cluster_id}/audit-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/clusters/{cluster_id}/audit-logs \
--header 'Authorization: Bearer <token>'{
"items": [
{
"action_type": "<string>",
"actor": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "<string>",
"autonomy": "<string>",
"email": "<string>",
"origin": "<string>",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "<string>",
"type": "agent"
},
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_is_deleted": true,
"cluster_name": "<string>",
"details": {},
"ip_address": "<string>",
"log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": {
"duration_ms": 123,
"error": "<string>",
"status": "succeeded"
},
"resource_id": "<string>",
"resource_type": "<string>",
"target": {
"kind": "<string>",
"name": "<string>",
"namespace": "<string>"
},
"timestamp": "2023-11-07T05:31:56Z",
"user_email": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Organisation API
List the audit log of one cluster
GET
/
org
/
clusters
/
{cluster_id}
/
audit-logs
List the audit log of one cluster
import requests
url = "https://platform.ankra.app/org/clusters/{cluster_id}/audit-logs"
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/org/clusters/{cluster_id}/audit-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/clusters/{cluster_id}/audit-logs \
--header 'Authorization: Bearer <token>'{
"items": [
{
"action_type": "<string>",
"actor": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "<string>",
"autonomy": "<string>",
"email": "<string>",
"origin": "<string>",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "<string>",
"type": "agent"
},
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_is_deleted": true,
"cluster_name": "<string>",
"details": {},
"ip_address": "<string>",
"log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": {
"duration_ms": 123,
"error": "<string>",
"status": "succeeded"
},
"resource_id": "<string>",
"resource_type": "<string>",
"target": {
"kind": "<string>",
"name": "<string>",
"namespace": "<string>"
},
"timestamp": "2023-11-07T05:31:56Z",
"user_email": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"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
Required range:
x <= 200Available options:
agent, human, system Available options:
succeeded, failed