Skip to main content
GET
Get Audit Logs

Endpoint

Overview

Retrieves audit logs for the authenticated user. IP addresses in log data are automatically decrypted for display.
IP Address Encryption: IP addresses stored in audit logs are encrypted using AES-256-GCM with user-specific keys. They are automatically decrypted when retrieved via this API endpoint. See IP Encryption for implementation details.

Request

Requires authentication via Bearer token.

Query Parameters

number
default:"50"
Maximum number of logs to return (max 100)
number
default:"0"
Number of logs to skip (for pagination)
string
Filter by audit action type (e.g., “USER_LOGIN”, “PASSWORD_CHANGE”)

Response

array
Array of audit log entries
number
Total number of logs matching the filter
number
Limit used in the query
number
Offset used in the query

Implementation Details

Code Reference

Status Codes

OK
Success
Unauthorized
Missing or invalid authentication token

Example Requests

Get All Logs

Get Logs with Pagination

Filter by Action

Example Response

Security Notes

  • Users can only view their own audit logs
  • IP addresses are automatically decrypted from storage format
  • Maximum limit is 100 logs per request
  • Logs are ordered by creation date (newest first)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

limit
integer
default:50

Maximum number of logs to return (max 100)

Required range: x <= 100
offset
integer
default:0

Number of logs to skip (for pagination)

action
string

Filter by audit action type (e.g., "USER_LOGIN", "PASSWORD_CHANGE")

Response

Audit logs

logs
object[]
total
integer
limit
integer
offset
integer