Audit Log API

Only superadmins, secretaries, assistants, and Django admin users may access log endpoints. All data is recorded by the backend, and frontend parameters are used only for filtering. Logs are stored append-only.

1. Get Log List

GET /api/v1/logs/

Query parameters:

  • start_date / end_date: time range. Supports dates such as 2025-12-14 or ISO datetime strings.

  • user: user ID.

  • role: user role identifier, such as superadmin or assistant.

  • module: business module name.

  • action: action name.

The response uses the default pagination structure. Each record contains fields such as user, role, module, action, target type/ID, request IP, user agent, extra data, and creation time.

2. Export CSV

GET /api/v1/logs/export/

Supports the same filters as the list endpoint and returns a text/csv file. The field order matches the list response for audit archiving.