accessBearerAuth In the value field below, fill in the access token. It has a 10 minutes validity period. A valid token can be obtained via the /accesstoken endpoint (call), AFTER authorization with refreshBearerAuth and the refresh token.
In: header
Id of the device or devices which we want to edit
Which strategy should be applied to merge the updated device properties with the properties which are already present. In strict mode, the device is completely overwritten by the updated device properties. Properties which are not included in the update are removed. This required that the user has monitorManagement rights for the device. In legacy mode, the device properties which are included in the update are overwitten, but those properties which are not included in the update are left unchanged. In merge mode: those properties which are not mentioned in the update are left untouched those properties whose values are not key-value objects in both the update AND in the original object are overwritten those properties whose values are key-value objects both in the update and the original are merged by recursively applying this strategy to the values of the original and the update Tip: merge mode is recursive for key-value objects, but it is not recursive for arrays. If you need to update a single item inside an array, use the PATCH endpoint instead.
"legacy""strict" | "legacy" | "merge"Before executing the update, validate the updated device using the schema corresponding to its nodeType (if such a schema exists)
An ISO 8601 time or a time of the format '<day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT', specifying the latest timestamp any of the affected devices might have received an update in order for the request to be executed. A code 412 error will be returned if at least one device was updated after the specified time
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
curl -X PUT "https://api.eniris.be/v1/device/0" \ -H "Content-Type: application/json" \ -d '{ "properties": {} }'{
"device": {
"id": 0,
"lastUpdate": "string",
"properties": {},
"userRights": {
"propertyEditabilities": {
"property1": true,
"property2": true
},
"monitorManagement": true
}
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "Missing or misformatted query parameter or body"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Failed to verify token"
}{
"statusCode": 412,
"error": "Precondition Failed",
"message": "At least one device was modified after the specified time"
}A user can only execute this call is he is a member of an authorizing role such that this role has a monitors relation with monitorManagement rights. Alternatively, the user must be member of a set of roles with monitors relations for the specified device, such that the set of device properties which these relations allow to edit are a subset of the device properties which are specified in the current request.