Audit Logs
Audit logs record the changes people make in your organization, so administrators can see who did what and when. Use them for compliance, security reviews and troubleshooting.
Audit logs need the Enterprise plan on LearnHouse Cloud, or the Enterprise Edition when self-hosted. On a self-hosted EE instance every organization is logged, whatever its plan.
Where to find them
Go to Users → Audit Logs in the dashboard. Only the Admin role can open them (Maintainers cannot), and the organization's two-factor policy applies.
What gets recorded
LearnHouse records every POST, PUT, PATCH and DELETE request made by a signed-in member of the organization, by a Backoffice staff member, or by one of the organization's API tokens. Read-only requests are not recorded, and neither are anonymous requests or health checks.
| Field | Description |
|---|---|
| User | Who made the change (ID, username and avatar) |
| Action | The method and path, for example PUT /api/v1/courses/course_123 |
| Method | POSTPUTPATCHDELETE |
| Path | The request path |
| Resource | The kind of item affected, taken from the path (for example coursesusers |
| Resource ID | The specific item, when the path has one |
| Status code | The HTTP response status |
| IP address | Where the request came from |
| Timestamp | When it happened |
| Payload | The request body, with sensitive fields removed |
Sensitive data
Before a payload is stored, any field whose name contains password, secret, token, api_key, apikey, private_key, credential, code, otp, reset or mfa is removed, at any depth.
Some payloads are not stored in full:
- Bodies larger than 64 KB, and file uploads (multipart forms), are not read. The log notes that the payload was omitted.
- Stored payloads larger than 8 KB are replaced by an omission marker.
Searching and filtering
| Control | Options |
|---|---|
| Resource | |
| Status | |
| Date |
Click a row's payload to open it in Event Payload. Use Refresh logs to load new entries.
CSV export
Export downloads the logs matching your filters as CSV, newest first, up to 50,000 rows. Columns: ID, Timestamp, User ID, Username, Action, Resource, Resource ID, Method, Path, Status Code and IP Address. Payloads are not included in the export.
How logging works
Entries are first queued in Redis, then written to the database in batches every 60 seconds, so logging does not slow requests down. New entries can take up to a minute to appear.
Audit logging needs Redis. If Redis is not configured, nothing is recorded. LearnHouse does not prune audit logs, so they are kept indefinitely.
API
Admins can also read the logs with a signed-in session (API tokens are not accepted):
GET /api/v1/ee/audit_logs/?org_id=...withoffset,limit(up to 100) and the filtersuser_id,username,name,action,resource,status_code,ip_address,start_dateandend_date.GET /api/v1/ee/audit_logs/exportfor the CSV.