A user can only execute this call is he is a member of an authorizing role which satisfies one of the following conditions: The authorizing role has direct or indirect deviceManagement rights for the role for which a device is created The authorizing role has indirect roleManagement rights for the role for which a device is created
Authorization
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
Query Parameters
Id of the role to which the device (and monitors relation) should be added
0 <= valueBefore creating a new device, validate the properties using the schema corresponding to its nodeType (if such a schema exists)
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.eniris.be/v1/device?roleId=0" \ -H "Content-Type: application/json" \ -d '{ "properties": {} }'{
"monitors": {
"id": 0,
"roleId": 0,
"deviceId": 0,
"monitorManagement": true,
"reads": [
"string"
],
"edits": [
"string"
]
},
"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": 403,
"error": "Forbidden",
"message": "User does not have sufficient rights"
}Perform a series of targeted update operations PATCH
Patch the properties of one or more devices by specifying JSON patch operations which should be applied to the device properties in accordance with RFC 6902. A user can only execute this call when 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.
Collect devices POST
Get all (or some of) the devices which are monitored by roles of which the user is a member
