Searches and filters tenant audit events using a POST request body to supply complex timestamp ranges and lookback intervals, returning structured JSON.
POST search enables passing search parameters within the request body rather than URL query parameters, avoiding URL length limitations during automated batch integration. The from and to fields represent the exact millisecond timestamps when the event occurred (not when it was ingested into the audit database). If from is omitted, events from the beginning of the 30-day retention window up to to are returned. If to is omitted, events from from up to the current time are returned.
The type parameter (all, byok, user_activity) is supplied as a query parameter on the search URL.
Method and endpoint
/audit/api/1/events/search
Parameters
| Parameter | Type | Required/optional | Description |
type | String | Optional | Event category filter: all (default), byok, or user_activity. |
Curl example
curl -X POST "https://audit.anaplan.com/audit/api/1/events/search?type=all" \
-H "Authorization: AnaplanAuthToken {anaplan_auth_token}" \
-H "Content-Type: application/json" \
-d '{
"from": 1489608511000,
"to": 1505776337000,
"interval": 24
}'
Response
Success response
If the request is successful, the API returns an HTTP 200 OK status code with a meta paging object and an array of matching audit events in JSON format.
| HTTP status | Status message | Description |
200 | OK | Audit events matching search criteria returned successfully. |
Example successful response body
{
"meta": {
"paging": {
"currentPageSize": 1,
"totalSize": 15,
"offSet": 0,
"nextOffset": 1
}
},
"response": [
{
"id": 899765065653542900,
"eventTypeId": "DSM-DAO0267I",
"userId": "8a8196a158539d600158b276856b0e5a",
"tenantId": "8a81969a515845e30151584d03830003",
"message": "user logged in",
"hostName": "audit.anaplan.com",
"eventDate": 1489608511000,
"checksum": "866a706f2ce13b78b3f9689c3300b34b238b518a46a5feb382a94bf2ef1a48f2"
}
]
}
Failure response
If the request is unsuccessful, the API returns an error code.
| HTTP status | Error message | Description/resolution |
400 | Bad Request | Invalid timestamp format or negative interval supplied. |
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": "Invalid search timestamp range"
}