Get Audit Data
/essbase/rest/v1/applications/{application}/databases/{database}/audittrail/data
Returns audit trail data in CSV string format if Accept='text/csv'
or Accept='text/plain'
. If Accept='application/octet-stream'
, returns audit data as a CSV stream to download. If Accept='application/json'
, returns the audit data list in JSON format.
Request
-
application: string
Application name.
-
database: string
Database name.
-
fetchCount(optional): integer(int64)
Number of records to be fetched.
Response
- text/plain
- text/csv
200 Response
OK
Audit trail data returned successfully.
string
400 Response
Bad Request
Failed to return audit data.
500 Response
Internal Server Error.
Examples
The following example shows how to get previously collected data audit trail information for an Essbase database.
This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat
.
Script with cURL Command - Enable Audit Trail
Before you can review data audit trail information, you must enable audit trail using application configuration property AUDITTRAIL. The following example shows how to enable it:
call properties.bat
curl -X POST "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample_Dynamic/configurations?links=none" -H Accept:application/json -H Content-Type:application/json -d '{"key": "AUDITTRAIL", "value": "DATA", "configured": false}' -u %User%:%Password%
Sample Response
The following example shows the contents of the response body in JSON format.
{
"key" : "AUDITTRAIL",
"value" : "DATA",
"configured" : false
}
Script with cURL Command - Get Audit Trail Details
After at least one user has updated data in the cube by submitting an update through Smart View, you can view data auditing results using the following example:
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample_Dynamic/databases/Basic/audittrail/data" -H Accept:application/json -H Content-Type:application/json -o audit_data.json -u %User%:%Password%
Sample Response
The following example shows the contents of the response body in audit_data.json
.
{
"items" : [ {
"seqNo" : 1,
"noOfDimensions" : "5",
"operationType" : "INPUT",
"user" : "power1",
"time" : "1662754461",
"members" : "Jan,Sales,100-10,New York,Actual",
"oldValue" : "678.0",
"newValue" : "701.0",
"displayText" : "(Jan,Sales,100-10,New York,Actual) Value changed from 678.0 to 701.0",
"cellNote" : ""
} ],
"offset" : 0,
"limit" : 50,
"count" : 1,
"totalResults" : 1,
"hasMore" : false
}