Audit
Audit log access
List audit logs
GET
/organizations/{org_id}/audit-logsList audit logs for organization (requires admin+ role)
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
org_id | string | path | Yes | Organization ID |
offset | integer | query | No | Number of items to skip |
limit | integer | query | No | Maximum number of items to return |
entity_type | string (user, organization, organization_member, organization_invitation, subscription, cloud_instance, cloud_api_key, cloud_backup, cloud_restore, cloud_backup_schedule, cloud_group, cloud_grant, cloud_authorization, identity_provider, identity_domain, scim_token, scim_user, scim_group, identity_group_mapping) | query | No | |
entity_id | string | query | No | |
action | string (create, read, update, delete, accept, verify, enable, disable, recover, revoke, login, deprovision) | query | No |
Code Examples
curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/audit-logs?offset=0&limit=20&entity_type=user&entity_id=550e8400-e29b-41d4-a716-446655440000&action=create" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/audit-logs?offset=0&limit=20&entity_type=user&entity_id=550e8400-e29b-41d4-a716-446655440000&action=create", {
method: "GET",
headers: {
Authorization: "Bearer YOUR_TOKEN"
}
});
const data = await response.json();Responses
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"organization_id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"entity_type": "user",
"entity_id": "550e8400-e29b-41d4-a716-446655440000",
"action": "create",
"changes": {
"old_value": {},
"new_value": {}
},
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0...",
"created_at": "2025-10-02T15:30:00Z"
}
],
"meta": {
"offset": 0,
"limit": 1,
"total": 0
}
}{
"type": "https://platform.antfly.io/errors/validation-error",
"title": "Validation Error",
"status": 400,
"detail": "Email address is required",
"instance": "https://platform.antfly.io/api/v1/users/550e8400-e29b-41d4-a716-446655440000",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "https://platform.antfly.io/errors/validation-error",
"title": "Validation Error",
"status": 400,
"detail": "Email address is required",
"instance": "https://platform.antfly.io/api/v1/users/550e8400-e29b-41d4-a716-446655440000",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "https://platform.antfly.io/errors/validation-error",
"title": "Validation Error",
"status": 400,
"detail": "Email address is required",
"instance": "https://platform.antfly.io/api/v1/users/550e8400-e29b-41d4-a716-446655440000",
"errors": [
{
"field": "string",
"message": "string"
}
]
}