Audit log call samples
Use the Varicent Incentives API to perform actions, such as listing Audit log events, and listing the details of a specific Audit log event.
List Audit log events
Use this call to list all Audit log events in Varicent Incentives.
Request
GET - api/v1/auditlog
Sample call
curl -X GET -H "Authorization: Bearer API_KEY" -H "Model: YOUR_CLIENT_MODEL” -H "Content-Type: application/json" https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/auditlog
Sample response
[ { "id": 86664, "userType": "Admin", "userId": "admin", "module": "Calculate", "eventName": "Completed Calculation", "time": "TIME_STAMP", "revisionStart": 91459, "revisionEnd": 91459, "message": "All items were calculated successfully." }, { "id": 86663, "userType": "Admin", "userId": "admin", "module": "Calculate", "eventName": "Started Calculation", "time": "TIME_STAMP", "message": "Full calculation started." }]
List details for an Audit log event
Use this call to list the details for a specific Audit log event in Varicent Incentives. For example, this call lists the changes made to table by an import.
Request
GET - api/v1/auditlog/{id}/details
Note
The Audit log iID can be obtained from GET - api/v1/auditlog
call response in the “id” field.
Sample call
curl -X GET -H "Authorization: Bearer API_KEY" -H "Model: YOUR_CLIENT_MODEL” -H "Content-Type: application/json" https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/auditlog/{id}/details
Sample response
{ "columns": [ { "name": "COLUMN_NAME", "type": " COLUMN_TYPE", "isKey": true, "nullable": true, "values": "COLUMN_VALUE", "lockedPeriod": { "start": " TIME_STAMP", "end": " TIME_STAMP" } } ], "rowChanges": [ { "start": [ {} ], "end": [ {} ], "rowChangeDiff": { "previous": { "savedBy": "USER_NAME ", "savedAt": " TIME_STAMP ", "values": [ {} ] }, "selected": { "savedBy": "USER_NAME", "savedAt": " TIME_STAMP ", "values": [ {} ] }, "current": { "savedBy": "USER_NAME ", "savedAt": "TIME_STAMP", "values": [ {} ] }, "hasPrevious": true, "hasSelected": true, "hasCurrent": true } } ], "table": "TABLE_NAME" }