Get all (or some of) the devices which are monitored by roles of which the user is a member. Using the query parameters, it is possible to apply filters both on devices which are returned, and on the properties of those devices. The POST /v1/device/query is a preferable alternative, which can better handle complex filters
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
Before sending a reply, a base64 encoded sha256 digest is calculated by sorting the devices by id and updating the hash with the lastUpdate properties of each of the devices. When the digest matches this property, code 204 with an empty response is returned.
Only return the specified device fields. If no fields are specified, all device fields are returned.
Only return devices with one of the specified ids
Only return devices with one of the specified node ids
Only return devices with one of the specified node types
Only return those devices which are monitored by roles with access to a specific view
Only return devices which are directly or indirectly monitored by one of the specified role ids. Prefer the companyId query parameter
Only return devices which are directly or indirectly monitored by one of the specified company ids
Only return devices which are active or inactive
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://api.eniris.be/v1/device"{
"device": [
{
"id": 0,
"lastUpdate": "string",
"properties": {},
"userRights": {
"propertyEditabilities": {
"property1": true,
"property2": true
},
"monitorManagement": true
}
}
]
}null{
"statusCode": 400,
"error": "Bad Request",
"message": "Missing or misformatted query parameter or body"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Failed to verify token"
}Collect companies associated with the user GET
Collect company roles associated with the user. This includes: <ul> <li> Any company roles of which the user is either a direct or indirect member, i.e. the user can operate on behalf of that company </li> <li> Any company role such that the user is a member of a role which is directly or indirectly managed by that company </li> </ul>
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.
