Audit Log
Was this helpful?
Was this helpful?
The endpoint AuditLog () can be used to get all changes of any object in the data model.
To get the changes of a given object with key KEY_X:
{BASE_URL}/ws/rest/AuditLog?filter=source(EQ)KEY_X
In the same request send the HTTP Header parameter fields with this JSON
{"objectName":"*","attributeName":"*","actionTime":"*","entryText":"*","source":"*","newValue":"*","oldValue":"*","isChangedByUser":"*","action":{"actionName":"*"},"user":{"userName":"*"}}
The response will be an array of AuditLog objects:
[
{
"key": 8345668,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/8345668",
"objectName": "Voyage",
"attributeName": "ladenConsumption",
"source": 8336217,
"user": {
"key": 3689599,
"self": "https://dev.dataloy.com/ws/rest/User/3689599",
"userName": "Andrea Biasillo"
},
"actionTime": "2023-03-03T19:23:00",
"entryText": "Field update: ladenConsumption",
"isChangedByUser": true,
"newValue": "83.29555785678073",
"oldValue": "67.03034584820784",
"action": {
"key": 1000009,
"self": "https://dev.dataloy.com/ws/rest/Action/1000009",
"actionName": "EDIT"
}
},
{
"key": 8345669,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/8345669",
"objectName": "Voyage",
"attributeName": "co2Laden",
"source": 8336217,
"user": {
"key": 3689599,
"self": "https://dev.dataloy.com/ws/rest/User/3689599",
"userName": "Andrea Biasillo"
},
"actionTime": "2023-03-03T19:23:00",
"entryText": "Field update: co2Laden",
"isChangedByUser": true,
"newValue": "267.045558488839",
"oldValue": "214.89928878935433",
"action": {
"key": 1000009,
"self": "https://dev.dataloy.com/ws/rest/Action/1000009",
"actionName": "EDIT"
}
},
{
"key": 8345670,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/8345670",
"objectName": "Voyage",
"attributeName": "tcResultDay",
"source": 8336217,
"user": {
"key": 3689599,
"self": "https://dev.dataloy.com/ws/rest/User/3689599",
"userName": "Andrea Biasillo"
},
"actionTime": "2023-03-03T19:23:00",
"entryText": "Field update: tcResultDay",
"isChangedByUser": true,
"newValue": "4877.341669917246",
"oldValue": "6227.220974136807",
"action": {
"key": 1000009,
"self": "https://dev.dataloy.com/ws/rest/Action/1000009",
"actionName": "EDIT"
}
},
{
"key": 8345671,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/8345671",
"objectName": "Voyage",
"attributeName": "ballastConsumption",
"source": 8336217,
"user": {
"key": 3689599,
"self": "https://dev.dataloy.com/ws/rest/User/3689599",
"userName": "Andrea Biasillo"
},
"actionTime": "2023-03-03T19:23:00",
"entryText": "Field update: ballastConsumption",
"isChangedByUser": true,
"newValue": "42.7633723560667",
"oldValue": "42.90031887514484",
"action": {
"key": 1000009,
"self": "https://dev.dataloy.com/ws/rest/Action/1000009",
"actionName": "EDIT"
}
]
The endpoint AuditLog can be used to know all the objects that have been deleted:
in combitation with other filters and the HTTP Header parameter fields with this value:
{"entryText":"*","user":"*","actionTime":"*"}
return a response like this one:
[
{
"key": 18475755,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475755",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:37:34",
"entryText": "Deleted LaytimeTimeSheetItem #14707386"
},
{
"key": 18475756,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475756",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:37:34",
"entryText": "Deleted LaytimeTimeSheetItem #14707388"
},
{
"key": 18475757,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475757",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:37:34",
"entryText": "Deleted LaytimeTimeSheetItem #14707389"
},
{
"key": 18475758,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475758",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:37:34",
"entryText": "Deleted LaytimeTimeSheetItem #14707387"
},
{
"key": 18475783,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475783",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:37:57",
"entryText": "Deleted LaytimeTimeSheetItem #18475759"
},
{
"key": 18475784,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475784",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:37:57",
"entryText": "Deleted LaytimeTimeSheetItem #18475760"
},
{
"key": 18475785,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475785",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:37:57",
"entryText": "Deleted LaytimeTimeSheetItem #18475761"
},
{
"key": 18475802,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475802",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:38:04",
"entryText": "Deleted LaytimeTimeSheetItem #18475780"
},
{
"key": 18475803,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475803",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:38:04",
"entryText": "Deleted LaytimeTimeSheetItem #18475781"
},
{
"key": 18475804,
"self": "https://dev.dataloy.com/ws/rest/AuditLog/18475804",
"user": {
"key": 2527205,
"self": "https://dev.dataloy.com/ws/rest/User/2527205"
},
"actionTime": "2024-02-02T08:38:04",
"entryText": "Deleted LaytimeTimeSheetItem #18475782"
}
]
where in the field entryText there is the object type and object key that has been deleted-