Edit

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.

See the Enterprise 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.

The Audit Logs tab listing changes with their time, user, resource, path and method, IP address and status

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.

FieldDescription
UserWho made the change (ID, username and avatar)
ActionThe method and path, for example PUT /api/v1/courses/course_123
MethodPOST, PUT, PATCH or DELETE
PathThe request path
ResourceThe kind of item affected, taken from the path (for example courses or users)
Resource IDThe specific item, when the path has one
Status codeThe HTTP response status
IP addressWhere the request came from
TimestampWhen it happened
PayloadThe 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

ControlOptions
Search byPath & Method, Resource, User (username, name or ID) or IP Address
ResourceAll Resources, User, Course or Organization
StatusAll, 200 OK, 403, 404 or 500
DateAll Time, Today, Last 7 Days, Last 30 Days or Custom Range

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.

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=... with offset, limit (up to 100) and the filters user_id, username, name, action, resource, status_code, ip_address, start_date and end_date.
  • GET /api/v1/ee/audit_logs/export for the CSV.