By enabling historization, you can view all changes made on a single building block. The "History" tab in the single element view displays those changes. Historization can be switched on/off on the System page. In addition, it is also possible to enable/disable historization and to get the history of a building block via the REST API.
Switch History on/off
The history can be enabled/disabled via a the following REST resouce:
The response status is 204 in case of success and the response body is empty.
Get History status
The following REST resouce can be used to check if historization is enabled or disabled:
The status of the response is 200 and its body contains a json with the current state of the history:
Get building block history
Existing building blocks
To retrieve the list of changes for a single building block, you can use the following REST resource:
For an existing building block (with the given id) the response will have status 200 and contain a json of the following form:
The history list contains all changes made to the building block. For each change, the author, the timestamp and the type ("UPDATE", "INSERT" or "DELETE") is specified in addition to a list of all changed features and details about added and/or removed values. Furthermore, the history of a building block contains entries for the time when the history was enabled/disabled. These entries contain the additional property "historyEnabled": true/false. Meta model changes, like a new assignement of an attribute to the building block type, are also logged in the history.
Deleted buidling blocks
It is also possible to retrieve the history for a building block which has been deleted as long as the former ID is still known. In this case, the latest history entry will have the change type "DELETED" and the list of feature changes will contain the properties of the building block at the time of deletion:
Non-existing building blocks
If an invalid ID is used in the history REST resource, you will still get a list of history entries as response. This list contains all general changes to the specific type of building block, i.e. enabling/disabling historization or meta model changes.