Sofar logo
Sofar logo
API
Collect devices (replaced by POST /v1/device/query) GETPerform a series of targeted update operations PATCHCreate a new device and the monitors relation which connects this device to a role POSTCollect devices POSTUpdate an existing device PUT
Device
GET
/v1/device

Authorization

accessBearerAuth

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.

AuthorizationBearer <token>

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

skipHash?string

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.

fields?array<>

Only return the specified device fields. If no fields are specified, all device fields are returned.

id?array<>

Only return devices with one of the specified ids

nodeId?array<>

Only return devices with one of the specified node ids

nodeType?array<>

Only return devices with one of the specified node types

viewId?array<>

Only return those devices which are monitored by roles with access to a specific view

roleId?array<>Deprecated

Only return devices which are directly or indirectly monitored by one of the specified role ids. Prefer the companyId query parameter

companyId?array<>

Only return devices which are directly or indirectly monitored by one of the specified company ids

isActive?boolean

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"
}

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

}