Audit logs
Audit logging and compliance - query, export, and verify audit logs (requires admin role)
List audit logs with filtering and pagination
Authorization
HTTPBearer In: header
Query Parameters
Filter by user ID (UUID)
Filter by event type
Filter by severity level
Filter by compliance status
Filter by affected table name
Filter by affected record ID (UUID)
Filter by trading symbol
Filter by start date (ISO 8601)
Filter by end date (ISO 8601)
Filter by resolution status
Filter by minimum risk score
Maximum number of results
1001 <= value <= 1000Number of results to skip
00 <= valueResponse Body
application/json
application/json
curl -X GET "https://loading/api/audit-logs"{
"audit_logs": [
{
"id": "string",
"event_type": "string",
"severity": "string",
"event_description": "string",
"user_id": "string",
"session_id": "string",
"table_name": "string",
"record_id": "string",
"old_values": {},
"new_values": {},
"changed_fields": [
"string"
],
"ip_address": "string",
"user_agent": "string",
"request_id": "string",
"endpoint": "string",
"http_method": "string",
"symbol": "string",
"amount": "string",
"currency": "string",
"exchange": "string",
"compliance_status": "string",
"risk_score": "string",
"flagged_keywords": [
"string"
],
"country_code": "string",
"jurisdiction": "string",
"regulatory_framework": "string",
"audit_metadata": {},
"tags": [
"string"
],
"error_code": "string",
"error_message": "string",
"stack_trace": "string",
"is_resolved": false,
"resolved_at": "string",
"resolved_by": "string",
"resolution_notes": "string",
"created_at": "string"
}
],
"total": 0,
"limit": 0,
"offset": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Export audit logs to CSV or JSON
Authorization
HTTPBearer In: header
Query Parameters
Export format (csv or json)
"csv""csv" | "json"Filter by user ID (UUID)
Filter by event type
Filter by severity level
Filter by compliance status
Filter by start date (ISO 8601)
Filter by end date (ISO 8601)
Maximum number of results to export
100001 <= value <= 50000Response Body
application/json
application/json
curl -X GET "https://loading/api/audit-logs/export"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Export audit logs to CEF format
Authorization
HTTPBearer In: header
Query Parameters
Filter by user ID (UUID)
Filter by event type
Filter by severity level
Filter by start date (ISO 8601)
Filter by end date (ISO 8601)
Chunk size for streaming export
1000100 <= value <= 5000Response Body
application/json
application/json
curl -X GET "https://loading/api/audit-logs/export/cef"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Export audit logs to LEEF format
Authorization
HTTPBearer In: header
Query Parameters
Filter by user ID (UUID)
Filter by event type
Filter by severity level
Filter by start date (ISO 8601)
Filter by end date (ISO 8601)
Chunk size for streaming export
1000100 <= value <= 5000Response Body
application/json
application/json
curl -X GET "https://loading/api/audit-logs/export/leef"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Export audit logs to Syslog format
Authorization
HTTPBearer In: header
Query Parameters
Filter by user ID (UUID)
Filter by event type
Filter by severity level
Filter by start date (ISO 8601)
Filter by end date (ISO 8601)
Chunk size for streaming export
1000100 <= value <= 5000Response Body
application/json
application/json
curl -X GET "https://loading/api/audit-logs/export/syslog"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Verify integrity of audit logs
Authorization
HTTPBearer In: header
Query Parameters
Verify logs from this date onwards
Verify logs up to this date
Maximum number of logs to verify
10001 <= value <= 10000Response Body
application/json
application/json
curl -X GET "https://loading/api/audit-logs/verify"{
"verified": true,
"total_checked": 0,
"tampered_logs": [
"string"
],
"message": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Verify audit log hash chain integrity
Authorization
HTTPBearer In: header
Query Parameters
Start date for verification (ISO 8601)
End date for verification (ISO 8601)
Maximum number of records to verify
Response Body
application/json
application/json
curl -X GET "https://loading/api/audit-logs/verify-chain"{
"verified": true,
"total_checked": 0,
"tampered_logs": [
"string"
],
"message": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Get single audit log by ID
Authorization
HTTPBearer In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://loading/api/audit-logs/string"{
"id": "string",
"event_type": "string",
"severity": "string",
"event_description": "string",
"user_id": "string",
"session_id": "string",
"table_name": "string",
"record_id": "string",
"old_values": {},
"new_values": {},
"changed_fields": [
"string"
],
"ip_address": "string",
"user_agent": "string",
"request_id": "string",
"endpoint": "string",
"http_method": "string",
"symbol": "string",
"amount": "string",
"currency": "string",
"exchange": "string",
"compliance_status": "string",
"risk_score": "string",
"flagged_keywords": [
"string"
],
"country_code": "string",
"jurisdiction": "string",
"regulatory_framework": "string",
"audit_metadata": {},
"tags": [
"string"
],
"error_code": "string",
"error_message": "string",
"stack_trace": "string",
"is_resolved": false,
"resolved_at": "string",
"resolved_by": "string",
"resolution_notes": "string",
"created_at": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}List configured webhooks
Authorization
HTTPBearer In: header
Query Parameters
Filter by active status
Response Body
application/json
application/json
curl -X GET "https://loading/api/audit-logs/webhooks"{
"webhooks": [
{
"id": "string",
"user_id": "string",
"webhook_url": "string",
"secret_key": "string",
"event_types": [
"string"
],
"is_active": true,
"max_retries": 0,
"retry_backoff_seconds": 0,
"created_at": "string",
"updated_at": "string",
"last_delivery_at": "string",
"failed_deliveries": 0
}
],
"total": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Configure webhook for real-time audit log delivery
Authorization
HTTPBearer In: header
Request Body
application/json
HTTPS webhook endpoint URL
List of event types to deliver (null/empty = all events)
Optional webhook description
Response Body
application/json
application/json
curl -X POST "https://loading/api/audit-logs/webhooks" \ -H "Content-Type: application/json" \ -d '{ "webhook_url": "string" }'{
"id": "string",
"user_id": "string",
"webhook_url": "string",
"secret_key": "string",
"event_types": [
"string"
],
"is_active": true,
"max_retries": 0,
"retry_backoff_seconds": 0,
"created_at": "string",
"updated_at": "string",
"last_delivery_at": "string",
"failed_deliveries": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Delete webhook configuration
Authorization
HTTPBearer In: header
Path Parameters
Webhook ID to delete
Response Body
application/json
curl -X DELETE "https://loading/api/audit-logs/webhooks/string"{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}