Skip to content

Update

Whenever an attribute or entry was updated, created or deleted, the change will be logged in the database and can be fetched via a unique version number.

Info

We recommend to use our WebSocket endpoint to receive updates in real time. It is significantly more efficient thant requesting updates with the Rest-API.

Properties

Name Type Description
version int Unique version number incrementing by one for every change. Note that for one increment step, multiple data can be changed with a bulk action
version_date DateTime The date and time in the client time zone when the version was raised

Get update (GET /update/{version})

Details

Returns all the occured changes begining from the given {version} + 1.

Note that the version could be raised, but the change is not relevant for the client because he has no access to this ressource or because HE changed the resource (when using the same API-Key).

Request parameters

Name Type Description
{version} int The last version the client is aware of
only_version bool, optional Only the fields version and version_date will be returned on a change. It won't be checked if the change is relevant for the given x-api-key → this ALWAYS returns the newest version
later_than DateTime, optional Besides the version number the version change has also to be later than the provided date
max_version bool, optional The maximum version until the updates should be returned
entryFields[] mixed, optional Fields of the entry to included in the response. See Entry properties for available fields
entryFields[attribute][] mixed, optional Fields of the attribute for an entry to include in the response. See Attribute properties for available fields
attributeFields[] mixed, optional Fields of the attribute to include in the response. See Attribute properties for available fields

Response

{
    "version": 10,
    "version_date": "2023-06-27T13:19:11",
    "entry": {
        "deleted": [ 
            55, 
            102, 
            103 
        ],
        "updated": [
            {
                "id": 1311,
                "attribute": {
                    "id": 52,
                },
                "date_time": "2023-01-06T16:00:00",
                "date_time_execution": "2023-01-06T16:38:59",
                "creator": 351,
                "parameters": []
            }, // etc ...
        ],
        "created": [
            {
                "id": 1312,
                "attribute": {
                    "id": 54,
                },
                "date_time": "2022-01-07T09:14:00",
                "date_time_execution": "2023-01-06T16:38:59",
                "creator": 351,
                "parameter": "I'm so powerfull!"
            },  // etc ...
        ],
    },
    "attribute": {
        "deleted": [],
        "updated": [],
        "created": []
    }

}

Response Codes

  • 200 The changes were successfuly returned
  • 204 No update of the version occured → the client is still "up to date". This is only the case, if the version matches EXACTLY the current version. Therefore, the version could be raised, but it's not relevant for the client → empty fields
  • 400 Invalid properties specified
  • 404 Authentication failed