🖍️
Dataloy VMS API Documentation
(Old) Dataloy VMS API Documentation
(Old) Dataloy VMS API Documentation
  • Dataloy VMS API
  • Dataloy Rest API
    • What is it?
    • Authentication / Authorization
    • Getting Started
    • Data Model
    • Filtering
    • Sorting
    • Pagination
    • Adjust Number of Fields to be Returned from a Request
    • Webhooks
      • Webhook example
      • Expressions Made Easy
      • Webhooks - New functionalities
    • Master data Objects
    • Attachments
    • Audit Log
  • User Guides
    • Accounting Integration API
      • Invoicing
      • Payments/Receipts
      • Voyages
      • Business Partners
      • Exchange Rates
      • Bunker Transactions
      • Actuals
      • Autopost Invoices
      • Accruals
    • Schedule API
    • Bunker Order Integration API
    • Service Order Integration API
    • Vessel Report
      • Release 8.0
      • Release 7.3 - 7.12
      • Release 7.0 - 7.2
      • Release 6.29 - 6.46
      • Legacy version (6.26 - 6.28)
      • Vessel report master data
    • Bunker Consumption API
    • Left join in API queries
    • Enterprise functionalities
      • Versioning
      • Endpoint access control
      • Data access control via target object
      • Data access control via target object and security role
      • Data access control at object level
      • Fields access control
      • Alert Scripts
      • Websockets
      • Bulk Deletion
      • Copy objects
      • OR and AND operators in API queries
      • Sub queries
      • XML Transformation
      • Expressions
      • Bulk Update
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Dataloy Rest API

Audit Log

PreviousAttachmentsNextAccounting Integration API

Last updated 1 year ago

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-

https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/audit-log
/ws/rest/AuditLog?filter=action.actionName(EQ)REMOVE