Audit#

Audit log access

List audit logs#

GET/organizations/{org_id}/audit-logs

List audit logs for organization (requires admin+ role)

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
offsetintegerqueryNoNumber of items to skip
limitintegerqueryNoMaximum number of items to return
entity_typestring (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)queryNo
entity_idstringqueryNo
actionstring (create, read, update, delete, accept, verify, enable, disable, recover, revoke, login, deprovision)queryNo

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"

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
  }
}