Skip to main content
GET
/
audit
/
logs
Get audit logs
curl --request GET \
  --url http://localhost:3000/audit/logs \
  --header 'Authorization: Bearer <token>'
{
  "statusCode": 123,
  "message": "OK",
  "data": {
    "data": [
      {
        "id": "<string>",
        "eventType": "<string>",
        "payload": {},
        "created_at": "2023-11-07T05:31:56Z",
        "source": "redis",
        "stream_id": "<string>",
        "org_id": "<string>",
        "project_id": "<string>",
        "actor_id": "<string>",
        "actor": {
          "id": "<string>",
          "email": "jsmith@example.com",
          "name": "<string>",
          "role": "<string>"
        }
      }
    ],
    "meta": {
      "total": 123,
      "page": 123,
      "pageCount": 123
    }
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

page
number

Page number for pagination (default: 1)

Required range: x >= 1
limit
number

Number of items per page (default: 50, max: 100)

Required range: 1 <= x <= 100
event_type
string

Filter by event type (e.g., "user.login_success", "flag.updated")

actor_id
string

Filter by the ID of the user who performed the action

org_id
string

Filter by organization ID

project_id
string

Filter by project ID

from_date
string<date-time>

Start date for filtering events (ISO 8601 format, e.g., "2025-10-01T00:00:00Z")

to_date
string<date-time>

End date for filtering events (ISO 8601 format, e.g., "2025-10-31T23:59:59Z")

source

Data source: "redis" for recent events, "database" for historical data, "both" for combined (default: "both")

Available options:
database
sort
string

Sort by field and direction in format "field:direction" (e.g., "created_at:desc", "event_type:asc"). Allowed fields: created_at, event_type, actor_id. Default: "created_at:desc"

Response

Default Response

statusCode
number
message
string
default:OK
data
object