Skip to content
Last updated

Export audit log entries as a CSV file for compliance, reporting, or offline analysis.

GEThttps://api.aitronos.com/v1/organizations/{organization_id}/audit-log/export

Exports audit log entries matching the specified filters as a downloadable CSV file. Supports the same filtering options as the query endpoint. Maximum 10,000 rows per export.

Path Parameters

organization_id string required

The unique identifier of the organization.


Query Parameters

entity_type string optional

Filter by entity type. Values: user, department, role, role_assignment, department_membership, permission, knowledge_slice, vector_store, knowledge_grant, knowledge_composite.

action_type string optional

Filter by action type. Values: created, updated, deleted, invited, deactivated, reactivated, removed, assigned, unassigned, reparented, membership_added, membership_removed, and more.

actor_id string optional

Filter by the user who performed the action.

target_id string optional

Filter by the target entity of the action.

department_id string optional

Filter by department context.

from_date string optional

Filter entries from this date (ISO 8601 format, e.g. 2025-01-01).

to_date string optional

Filter entries until this date (ISO 8601 format, e.g. 2025-12-31).

search_term string optional

Full-text search across entity name, actor name, and actor email.


Returns

Returns a CSV file as a streaming download. The CSV contains these columns:

ColumnDescription
TimestampWhen the action occurred (ISO 8601)
Entity TypeType of entity affected
Entity NameName of the entity
ActionAction performed
Actor NameName of the user who performed the action
Actor EmailEmail of the user
Target NameName of the target (if applicable)
Previous ValueValue before the change (if applicable)
New ValueValue after the change (if applicable)

The response has Content-Type: text/csv and Content-Disposition header with filename audit-log-{org_id}-{date}.csv.

cURL
curl -s -X GET "https://api.aitronos.com/v1/organizations/org_abc123/audit-log/export?from_date=2025-01-01&to_date=2025-12-31" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -o audit-log.csv