Audit Logs API
Auris automatically records every administrative action, authentication event, and security-relevant operation in an immutable audit trail. The Audit Logs API provides read access to these logs and management of log streaming configurations that forward events to external observability platforms.
Audit logs are retained according to your plan’s retention policy. All log entries are immutable — they cannot be edited or deleted through the API.
All endpoints require the x-tenant header and a valid Bearer token.
Querying Logs
/api/logs/auditRequires: view:auditList audit log entries with filtering and pagination. Results are returned in reverse chronological order (newest first). Supports filtering by action, user, resource type, severity level, date range, and free-text search.
Query parameters
Example request
GET /api/logs/audit?action=LOGIN&startDate=2025-02-01T00:00:00Z&limit=50Success response
{
"data": [
{
"id": "log_abc123",
"action": "LOGIN",
"userId": "usr_def456",
"resource": "session",
"resourceId": "sess_ghi789",
"status": "failure",
"errorCode": "invalid_credentials",
"errorMessage": "Invalid credentials",
"metadata": {
"method": "password"
},
"clientIp": "203.0.113.42",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"createdAt": "2025-02-18T14:30:00Z"
},
{
"id": "log_jkl012",
"action": "ROLE_UPDATED",
"userId": "usr_admin001",
"resource": "role",
"resourceId": "role_mno345",
"status": "success",
"errorCode": null,
"errorMessage": null,
"metadata": {
"permissions": ["view:invoices", "create:invoices", "edit:invoices"]
},
"clientIp": "10.0.1.50",
"userAgent": "AurisConsole/1.0",
"createdAt": "2025-02-18T13:15:00Z"
}
],
"pagination": {
"total": 1284,
"limit": 50,
"offset": 0,
"hasMore": true
}
}Log Entry Shape
Every audit log entry has the following structure:
action values are not dot-notation. Dot-notation strings such as
user.login are event-subscription event types — a separate namespace used by
webhooks. Filtering audit logs with ?action=user.login matches
nothing; use ?action=LOGIN.
Common Action Types
These are the values stored in action. The right-hand column is the
corresponding webhook event type, for cross-referencing with
event subscriptions — it is not a value you can filter on here.
The details field for mutation events (create, update, delete) typically includes before and after snapshots where applicable. For sensitive fields like passwords and secrets, only the fact that the field changed is recorded — not the actual values.
Log Streaming
Log streaming forwards audit events in real-time to external observability and SIEM platforms. When a log stream is configured and active, every audit event is sent to the configured destination in addition to being stored in the Auris database.
/api/log-streamsRequires: admin:allList all configured log streams for the tenant. Returns stream metadata, type, status, and last delivery time.
Success response
{
"success": true,
"data": [
{
"id": "ls_abc123",
"name": "Production Datadog",
"type": "DATADOG",
"status": "active",
"config": {
"region": "us1",
"apiKey": "dd_api_***...***"
},
"lastDeliveryAt": "2025-02-18T14:29:55Z",
"createdAt": "2025-01-10T09:00:00Z"
},
{
"id": "ls_def456",
"name": "SIEM Webhook",
"type": "WEBHOOK",
"status": "active",
"config": {
"url": "https://siem.internal.acme.com/auris-logs",
"headers": { "X-Custom-Header": "value" }
},
"lastDeliveryAt": "2025-02-18T14:29:58Z",
"createdAt": "2025-02-01T11:30:00Z"
}
]
}/api/log-streamsRequires: admin:allCreate a new log stream. Each stream type requires a different configuration shape. Auris validates the configuration and optionally performs a test delivery before saving.
Stream Type: WEBHOOK
Sends each audit event as an HTTP POST to the specified URL. Supports custom headers for authentication.
Request body
{
"name": "SIEM Webhook",
"type": "WEBHOOK",
"config": {
"url": "https://siem.internal.acme.com/auris-logs",
"headers": {
"Authorization": "Bearer your-siem-token",
"X-Source": "auris"
}
}
}The webhook payload is the JSON audit log entry, sent with Content-Type: application/json.
Stream Type: AMAZON_S3
Batches audit events and uploads them as JSON files to an S3-compatible bucket.
Request body
{
"name": "S3 Archive",
"type": "AMAZON_S3",
"config": {
"bucket": "auris-audit-logs",
"region": "us-east-1",
"accessKeyId": "<your-aws-access-key-id>",
"secretAccessKey": "<your-aws-secret-access-key>",
"prefix": "auris/tenant-name/"
}
}Files are uploaded with keys in the format: {prefix}YYYY/MM/DD/HH-mm-ss-{uuid}.json.
Stream Type: DATADOG
Datadog is a US-hosted third-party SaaS service. Depending on your data-residency and compliance requirements, verify that forwarding audit events to Datadog is permitted under your policies before enabling this stream type.
Sends audit events to the Datadog Log Management API.
Request body
{
"name": "Datadog Logs",
"type": "DATADOG",
"config": {
"apiKey": "dd_api_key_here",
"region": "us1",
"service": "auris-iam",
"source": "auris"
}
}Stream Type: SPLUNK
Sends audit events to Splunk via the HTTP Event Collector (HEC).
Request body
{
"name": "Splunk HEC",
"type": "SPLUNK",
"config": {
"hecUrl": "https://splunk.internal.acme.com:8088/services/collector/event",
"hecToken": "your-hec-token",
"index": "auris_audit",
"source": "auris-iam",
"sourcetype": "_json"
}
}Optional body field: eventFilters
All stream types accept an optional eventFilters field to restrict which action types are forwarded to the destination.
{
"name": "SIEM Webhook",
"type": "WEBHOOK",
"config": { "url": "https://siem.internal.acme.com/auris-logs" },
"eventFilters": ["user.login", "role.update", "security.brute_force.lockout"]
}Success response (all types)
{
"success": true,
"data": {
"id": "ls_ghi789",
"name": "Datadog Logs",
"type": "DATADOG",
"status": "active",
"config": {
"region": "us1",
"apiKey": "dd_api_***...***",
"service": "auris-iam",
"source": "auris"
},
"createdAt": "2025-02-18T10:00:00Z"
}
}Sensitive fields in the config (API keys, secrets, tokens) are masked in GET responses. The full values are only used internally for delivery and are never exposed through the API after creation.
Error codes
/api/log-streams/[id]Requires: admin:allGet full details for a specific log stream, including its configuration (with secrets masked), status, and delivery statistics.
Success response
{
"success": true,
"data": {
"id": "ls_abc123",
"name": "Production Datadog",
"type": "DATADOG",
"status": "active",
"config": {
"region": "us1",
"apiKey": "dd_api_***...***",
"service": "auris-iam",
"source": "auris"
},
"lastDeliveryAt": "2025-02-18T14:29:55Z",
"deliveryCount": 15420,
"errorCount": 3,
"lastError": null,
"createdAt": "2025-01-10T09:00:00Z",
"updatedAt": "2025-02-15T08:00:00Z"
}
}/api/log-streams/[id]Requires: admin:allUpdate a log stream’s name, configuration, or status. Use this to rotate API keys, change endpoints, or pause/resume streaming.
Request body — update config
{
"name": "Production Datadog (v2)",
"config": {
"apiKey": "new_dd_api_key_here"
}
}Request body — pause streaming
{
"status": "paused"
}Success response
{
"success": true,
"data": {
"id": "ls_abc123",
"name": "Production Datadog (v2)",
"status": "active",
"updatedAt": "2025-02-18T11:00:00Z"
}
}Stream statuses:
/api/log-streams/[id]Requires: admin:allDelete a log stream. Delivery stops immediately. Historical audit logs are not affected — they remain in the Auris database regardless of streaming configuration.
Success response
{
"success": true
}Permissions Reference
Audit logs are append-only and immutable. There is no API endpoint to delete or modify log entries. This ensures the integrity of the audit trail for compliance purposes (SOC 2, ISO 27001, GDPR Article 30).
Webhook Delivery Format
For WEBHOOK-type log streams, each event is delivered as an HTTP POST with the following structure:
The event object is posted flat — there is no event, tenant or data wrapper:
{
"action": "LOGIN",
"resource": "session",
"resourceId": "sess_ghi789",
"status": "success",
"userId": "usr_def456",
"clientIp": "203.0.113.42",
"userAgent": "Mozilla/5.0...",
"metadata": { "method": "password" },
"timestamp": "2025-02-18T14:30:00Z"
}The webhook includes the headers configured in the log stream plus Content-Type: application/json and User-Agent: Auris-LogStream/1.0.
Deliveries are retried up to 8 attempts with exponential backoff and full jitter (roughly 30s, 60s, 120s, …, capped at 6 hours) on non-2xx responses. A stream is disabled automatically after 10 consecutive failures.
Related
- Log Streaming — Stream audit logs to external services like Datadog and Splunk
- Logs & Compliance — View and filter logs from the Console