Query Audit Logs
https://app.eraser.io/api/audit-logs Note – This API endpoint is only available to Enterprise Plan customers.
This endpoint is designed for SIEM integration with platforms like Azure Sentinel, Splunk, Elastic SIEM, and other security monitoring tools.
Returns events in ECS (Elastic Common Schema) format by default, with optional Splunk CIM format support.
Authentication requires a tenant-level audit API key (different from team API tokens). Contact support to obtain your audit API key.
An example cURL request is:
curl --location 'https://app.eraser.io/api/audit-logs?limit=100'
--header 'Authorization: Bearer $YOUR-KEY-HERE' An example response is:
{
"events": [
{
"id": "a3f9c2e1d8b4",
"@timestamp": "2026-01-15T14:32:18.000Z",
"event": {
"id": "a3f9c2e1d8b4",
"category": ["authentication"],
"action": "auth.login",
"outcome": "success"
},
"user": {
"id": "7k2m9n4p8q1r"
},
"eraser": {
"teamId": "x5y8z3a7b2c6",
"organizationId": "d9e4f1g6h3j8"
}
},
{
"id": "b7e2d5f9a1c3",
"@timestamp": "2026-01-15T14:28:45.000Z",
"event": {
"id": "b7e2d5f9a1c3",
"category": ["file"],
"action": "data.file.created",
"outcome": "success"
},
"user": {
"id": "m8n2p5q9r3s7"
},
"eraser": {
"teamId": "x5y8z3a7b2c6",
"workspaceId": "t4u7v1w6x9y2",
"organizationId": "d9e4f1g6h3j8",
"metadata": {
"fileName": "Architecture Diagram"
}
}
}
],
"nextCursor": "eyJ0aW1lc3RhbXAiOiIyMDI2LTAxLTE1VDE0OjI4OjQ1LjAwMFoiLCJpZCI6ImI3ZTJkNWY5YTFjMyJ9",
"hasMore": true,
"serverTime": "2026-01-15T14:35:22.000Z"
} Query parameters
startTime string queryStart of the time range (inclusive). Must be an RFC3339/ISO 8601 timestamp. Example: `2025-01-01T00:00:00Z`
endTime string queryEnd of the time range (exclusive). Must be an RFC3339/ISO 8601 timestamp. Example: `2025-01-15T00:00:00Z`
cursor string queryOpaque cursor string for pagination. Use the `nextCursor` value from a previous response to fetch the next page of results.
limit integer queryMaximum number of events to return per request. Defaults to 100. Maximum allowed value is 1000.
eventType string queryFilter events by action type.
auth.loginauth.logoutiam.user.creatediam.user.deletediam.user.invitediam.role.grantediam.role.revokedadmin.api_key.createdadmin.api_key.deletedadmin.settings.changedadmin.integration.connectedadmin.integration.disconnectedadmin.team.createdadmin.team.deleteddata.file.createddata.file.archiveddata.file.deleteddata.file.exporteddata.file.invite_sentdata.file.visiteddata.file.settings.changed
userId string queryFilter events by the ID of the user who performed the action.
format string queryOutput format for audit events. - `ecs` (default): Elastic Common Schema format, compatible with Azure Sentinel, Elastic SIEM - `splunk`: Splunk Common Information Model format
ecssplunk
Responses
200 – Audit events retrieved successfully
events object[] required20 fields Array of audit events in the requested format
events object[] required20 fieldsid string requiredUnique identifier for the audit event
@timestamp string requiredISO 8601 timestamp when the event occurred
event object required4 fields
event object required4 fieldsid string requiredEvent identifier (same as top-level id)
category string[] requiredECS event category
authenticationiamconfigurationfile
action string requiredThe specific action that occurred
auth.loginauth.logoutiam.user.creatediam.user.deletediam.user.invitediam.role.grantediam.role.revokedadmin.api_key.createdadmin.api_key.deletedadmin.settings.changedadmin.integration.connectedadmin.integration.disconnectedadmin.team.createdadmin.team.deleteddata.file.createddata.file.archiveddata.file.deleteddata.file.exporteddata.file.invite_sentdata.file.visiteddata.file.settings.changed
outcome string requiredWhether the action succeeded or failed
successfailure
organization object 1 fields Organization/tenant information (for multi-tenant deployments)
organization object 1 fieldsid string Organization identifier
user object 1 fields The user who performed the action
user object 1 fieldsid string User identifier
user.target object 1 fields Target user for IAM events (e.g., user being invited or having role changed)
user.target object 1 fieldsid string Target user identifier
url object 1 fields URL information for the request
url object 1 fieldspath string URL path of the request
eraser object 4 fields Eraser-specific event context
eraser object 4 fieldsteamId string Team identifier
workspaceId string Workspace/file identifier
organizationId string Organization identifier
metadata object Additional event-specific metadata
nextCursor string Opaque cursor for fetching the next page. Pass this value as the `cursor` parameter in subsequent requests. Null when there are no more results.
hasMore boolean requiredWhether there are more events available beyond this page
serverTime string requiredServer timestamp when the response was generated (ISO 8601)
{
"events": [
{
"id": "abc123xyz",
"@timestamp": "2025-01-14T12:00:00Z",
"event": {
"id": "abc123xyz",
"category": [
"authentication"
],
"action": "auth.login",
"outcome": "success"
},
"organization": {
"id": "string"
},
"user": {
"id": "user_12345"
},
"user.target": {
"id": "user_99999"
},
"url": {
"path": "/api/auth/sign-in"
},
"eraser": {
"teamId": "team_67890",
"workspaceId": "workspace_11111",
"organizationId": "string",
"metadata": {
"method": "sso",
"changedFields": [
"name",
"defaultWorkspaceAccess"
]
}
}
}
],
"nextCursor": "eyJ0aW1lc3RhbXAiOiIyMDI1LTAxLTE0VDEyOjAwOjAwWiIsImlkIjoiYWJjMTIzIn0=",
"hasMore": true,
"serverTime": "2025-01-15T10:30:00Z"
} 400 – Invalid request parameters
error string Human-readable error message
code string Machine-readable error code
{
"error": "string",
"code": "string"
} 401 – Invalid or missing audit API key
error string Human-readable error message
code string Machine-readable error code
{
"error": "string",
"code": "string"
} 500 – Internal server error
error string Human-readable error message
code string Machine-readable error code
{
"error": "string",
"code": "string"
} 503 – Audit logging not configured for this deployment
error string Human-readable error message
code string Machine-readable error code
{
"error": "string",
"code": "string"
}