Skip to main content

Audit Logs

2 API calls in this section.

List Audit Logs

Reporting, Audit & Webhooks / Audit Logs
GET/audit-logs?tenant_id=&page=1&limit=50&search=&sort_by=created_at&sort_order=desc&column_filters=

Retrieves a paginated list of audit logs with sorting, per-column filtering, and free-text search. Authentication: - Requires valid authentication token or API key - Requires 'manage:operations:tenant' permission or system admin Sorting (sort_by + sort_order): - Supported columns: action, method, endpoint, actor_name, status_code, created_at - action sorts by endpoint; actor_name sorts by the joined user's full_name - Default: created_at desc Column filters (column_filters): - URL-encoded JSON, AND semantics across all keys - action: substring match across method+endpoint - method: exact match (auto-uppercased) - endpoint: case-insensitive substring match - actor_name: case-insensitive substring match on the actor's full_name - status_code: numeric equality - created_at: { from?: string, to?: string } range; plain YYYY-MM-DD values are expanded to full UTC day bounds, and to is inclusive through the end of that day Response fields: - user: joined actor (id, full_name) - action: computed as "{method} {endpoint}" - tenant: joined tenant (id, name)

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/audit-logs?tenant_id=&page=1&limit=50&search=&sort_by=created_at&sort_order=desc&column_filters=" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json"

Query parameters

tenant_idOptional
query string

UUID of the tenant (required for tenant admins; system admins may omit to query across tenants)

pageOptional
query string

1

Page number for pagination (default: 1)

limitOptional
query string

50

Number of items per page (default: 25, max: 200)

searchOptional
query string

Free-text search across endpoint/method/ip_address/user_agent (optional)

sort_byOptional
query string

created_at

Column to sort by. Supported: action, method, endpoint, actor_name, status_code, created_at (default: created_at)

sort_orderOptional
query string

desc

Sort direction: asc or desc (default: desc)

column_filtersOptional
query string

URL-encoded JSON object with per-column filters (AND semantics). Supported keys: action (string), method (string), endpoint (string), actor_name (string), status_code (number), created_at ({ from?: string, to?: string }). Plain YYYY-MM-DD values are normalized to whole-day UTC bounds, so to stays inclusive through 23:59:59.999Z. Example: {"method":"GET","status_code":200,"created_at":{"from":"2026-05-01","to":"2026-05-11"}}

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200
Response body
json
1{2  "success": true,3  "message": "Audit Logs Retrieved Successfully",4  "audit_logs": [],5  "page": 1,6  "limit": 25,7  "total": 08}

Get Audit Log By Id

Reporting, Audit & Webhooks / Audit Logs
GET/audit-logs/{{audit_log_id}}?tenant_id=

Retrieves a single audit log by id (tenant-scoped). Authentication: - Requires valid authentication token or API key - Requires 'manage:operations:tenant' permission or system admin

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/audit-logs/{{audit_log_id}}?tenant_id=" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json"

Path parameters

audit_log_idRequired
path string

{{audit_log_id}}

Query parameters

tenant_idOptional
query string

UUID of the tenant (only honored for system admins; otherwise inferred from auth context)

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200
Response body
json
1{2  "success": true,3  "message": "Audit Logs Retrieved Successfully",4  "audit_log": null5}