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. 

POST

/audit/api/1/events/search

Parameter Type Required/optionalDescription
type String Optional Event category filter: all (default), byok, or user_activity. 

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

  }'

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 statusStatus message Description
200OKAudit events matching search criteria returned successfully. 

{

  "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"

    }

  ]

}

If the request is unsuccessful, the API returns an error code.

HTTP statusError message Description/resolution
400Bad RequestInvalid timestamp format or negative interval supplied.
401UnauthorizedInvalid or expired authentication token. Re-authenticate with the Anaplan Authentication Service.
403ForbiddenUser lacks the Tenant Auditor role required to access the tenant audit logs.

{

  "status": "FAILURE",

  "statusMessage": "Invalid search timestamp range" 

}