> For the complete documentation index, see [llms.txt](https://api.dataloy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.dataloy.com/api-release-8.6/dataloy-rest-api/audit-log.md).

# Audit Log

The endpoint AuditLog (<https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/audit-log>) 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

```json
{"objectName":"*","attributeName":"*","actionTime":"*","entryText":"*","source":"*","newValue":"*","oldValue":"*","isChangedByUser":"*","action":{"actionName":"*"},"user":{"userName":"*"}}
```

The response will be an array of AuditLog objects:

```json
[
    {
        "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:

[/ws/rest/AuditLog?filter=action.actionName(EQ)REMOVE](https://dev.dataloy.com/ws/rest/AuditLog?filter=action.actionName\(EQ\)REMOVE\&pageNumber=1\&limit=10\&filter=actionTime\(GT\)2024-02-01T21:48:22)

in combitation with other filters and the HTTP Header parameter **fields** with this value:

{"entryText":"\*","user":"\*","actionTime":"\*"}

return a response like this one:

```json
[
    {
        "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-


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api.dataloy.com/api-release-8.6/dataloy-rest-api/audit-log.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
