In this release
This version includes significant delete operations improvements and a couple of PATCH operation improvements.
New functionality
Hard delete
Simple delete means that the twin is archived in the database. Hard delete means complete database removal of the twin without leaving any fallback copy (except snapshot history).
Hard delete is not allowed for twins with orphans. Meaning that orphans need to be deleted first. Hard delete can be called with the new query parameter ‘hard’ using the existing DELETE endpoints.
DELETE https://<host>/api/json/<class>/<uuid>?hard=true
Multiple delete
Now it is possible to delete a batch of items in one call. The new batch delete endpoints are implemented as http POST method that accepts body of the following format:
The list of new endpoints (note the plural “s”):
- POST /json/realestates/delete
- POST /json/realestatecomponents/delete
- POST /json/buildingcomponents/delete
- POST /json/rooms/delete
- POST /json/storeys/delete
- POST /json/assets/delete
- POST /json/devices/delete
- POST /json/sensors/delete
- POST /json/actuators/delete
- POST /json/aliasnamespaces/delete
PATCH improvements
Patching Alias
Twin property ‘hasAlias’ can be patched with two operations ADD and REMOVE with the correct Alias json object. Partial Alias patching is not supported. Example:
PATCH https://<host>/api/json/<class>/<uuid>
Patching Twin status
Twin property ‘status’ can be patched with operation REPLACE.
PATCH https://<host>/api/json/<class>/<uuid>
(Note: Archive value is used only for archived twins)
Patching Source and Comment properties
Twin properties ‘source’ and ‘comment’ can be patched with operations ADD,REPLACE,REMOVE.
PATCH https://<host>/api/json/<class>/<uuid>
Breaking changes
None
Fixes and minor updated
Open API documentation fixes and improvements.