Retrieves recent tenant audit events in structured JSON format, enabling security engineers to extract user activity and BYOK cryptographic events into automated security pipelines.
Requires the Tenant Auditor role assigned by a Tenant Administrator, and the Audit feature must be active on the tenant. Logs are retained for a rolling window of up to 30 days. The API isn't a permanent storage repository; clients should poll frequently and archive logs in their SIEM. The event type parameter filters by all, byok, or user_activity. Time bounds can be specified using millisecond UTC timestamps (dateFrom, dateTo) or a relative lookback window (intervalInHours).
The limit parameter can't exceed 10,000 events per call; exceeding this threshold returns an HTTP 204 No Content error code.
Method and endpoint
/audit/api/1/events
Parameters
| Parameter | Type | Required/optional | Description |
type | String | Optional | Event category filter: all (default), byok, or user_activity. |
dateFrom | Long integer | Optional | Start time boundary timestamp in milliseconds UTC. |
dateTo | Long integer | Optional | End time boundary timestamp in milliseconds UTC. |
intervalInHours | Integer | Optional | Relative lookback window in hours from current time (for example, 24, 168). |
limit | Integer | Optional | Maximum results to return per page (default is 20, maximum is 10,000). |
offset | Integer | Optional | Starting record offset index for pagination. |
Curl example
curl -X GET "https://audit.anaplan.com/audit/api/1/events?type=all&intervalInHours=24" \
-H "Authorization: AnaplanAuthToken {anaplan_auth_token}" \
-H "Accept: application/json"\
Response
Success response
If the request is successful, the API returns an HTTP 200 OK status code with meta paging information and an array of audit event objects containing event IDs, timestamps, user GUIDs, IP addresses, and checksums.
| HTTP status | Status message | Description |
200 | OK | Audit events were successfully retrieved in JSON format. |
Example successful response body
{
"meta": {
"paging": {
"currentPageSize": 2,
"totalSize": 263,
"offSet": 0,
"nextOffset": 2,
"nextUrl": "https://audit.anaplan.com/audit/api/1/events?limit=2&offset=2"
}
},
"response": [
{
"id": 971529164212789248,
"eventTypeId": "USR-04",
"userId": "8a80d86a5565443f01557f053e6719ba",
"tenantId": "8a80d8034e9a6fa0014e9aa747ae0002",
"message": "user logged in",
"success": true,
"ipAddress": "10.1.101.85",
"userAgent": "Mozilla/5.0",
"hostName": "audit.anaplan.com",
"serviceVersion": "5.3.0.1674",
"eventDate": 1520433163000,
"eventTimeZone": "UTC",
"createdDate": 1520465578000,
"checksum": "f63715026fd7d9511f73ec29c3e5fb55cdc143d9c7723a86e66a0c7198008f75"
}
]
}
Failure response
If the request is unsuccessful, the API returns an error code.
| HTTP status | Error message | Description/resolution |
204 | No Content | Returned when requested limit exceeds 10,000 or no events match filter criteria. |
401 | Unauthorized | Invalid or expired authentication token. Re-authenticate with the Anaplan Authentication Service. |
403 | Forbidden | User lacks the Tenant Auditor role required to access the tenant audit logs. |
Example error response body
{
"status": "FAILURE",
"statusMessage": "User does not have Tenant Auditor permissions"
}