Audit Logs
1 API call in this section.
List Audit Logs
/system/audit-logsRetrieves a paginated list of audit logs with optional filtering. Audit logs track all API requests and responses for security and compliance purposes.
User must have 'manage:operations:tenant' permission or be a system admin
Response
Returns a paginated list of audit logs
Includes pagination metadata (total count, page, limit)
Each audit log entry includes:
Request details (method, endpoint, data)
Response details (status code, data)
Actor information (user ID)
Timestamps
IP address and user agent
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_idOptional | string | UUID of the tenant (optional for system admins) (optional for system admins): UUID of the tenant Example: |
actor_idOptional | string | Filter by user ID who performed the action (optional) |
start_dateOptional | string | Filter by start date (ISO format, optional) Filter by start date (ISO format) |
end_dateOptional | string | Filter by end date (ISO format, optional) Filter by end date (ISO format) |
endpointOptional | string | Filter by API endpoint (optional) |
methodOptional | string | Filter by HTTP method (optional) |
status_codeOptional | string | Filter by HTTP status code (optional) |
pageOptional | string | Page number for pagination (optional, default: 1) Page number for pagination (default: 1) Example: |
limitOptional | string | Number of items per page (optional, default: 10) Number of items per page (default: 10) Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
X-API-Key | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/system/audit-logs?tenant_id=${TENANT_ID}&actor_id=&start_date=&end_date=&endpoint=&method=&status_code=&page=1&limit=10" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --header "X-API-Key: ${ONDI_TENANT_API_KEY}"Response examples
1{2 "success": true,3 "message": "Audit logs retrieved successfully",4 "audit_logs": [5 {6 "id": "audit-uuid-1",7 "tenant_id": "tenant-uuid",8 "actor_id": "user-uuid-1",9 "endpoint": "/api/deliveries",10 "method": "POST",11 "request_data": {12 "pickup_location": "location-1",13 "delivery_location": "location-2"14 },15 "response_data": {16 "id": "delivery-uuid-1",17 "status": "created"18 },19 "status_code": 201,20 "ip_address": "192.168.1.1",21 "user_agent": "Mozilla/5.0...",22 "created_at": "2023-04-01T10:00:00Z"23 },24 {25 "id": "audit-uuid-2",26 "tenant_id": "tenant-uuid",27 "actor_id": "user-uuid-2",28 "endpoint": "/api/deliveries/delivery-uuid-1",29 "method": "PUT",30 "request_data": {31 "status": "in_transit"32 },33 "response_data": {34 "id": "delivery-uuid-1",35 "status": "in_transit"36 },37 "status_code": 200,38 "ip_address": "192.168.1.2",39 "user_agent": "Mozilla/5.0...",40 "created_at": "2023-04-01T11:30:00Z"41 }42 ],43 "page": 1,44 "limit": 10,45 "total": 246}