Sofar logo
Sofar logo
API
Delete a monitors relation DELETECollect monitors relations (replaced by POST /v1/role/{roleId}/monitors/query) GETCollect monitors relations POSTCreate or update a monitors relation PUTUpdate an existing monitors relation PUT
Monitors
GET
/v1/role/{roleId}/monitors

Authorization

accessBearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

roleId*|array<>|

Delete a monitors relation DELETE

Delete a specified monitors relation. If the deleted monitors relation was the only monitors relation of the connected device with monitorManagement rights, the device and all its associated relations will be deleted as well.<br><br> To execute this query, the user must be a member of an authorizing role which satisfies both of the following conditions: <ol> <li> One of the following role-related conditions is true: <ul> <li> The authorizing role has *direct or indirect* deviceManagement rights for the role from which the monitors relation is deleted </li> <li> The authorizing role has *indirect* roleManagement rights for the role from which the monitors relation is deleted </li> </ul> </li> <li> The authorizing role has monitorManagement rights for the device to which the monitors relation is deleted </li> </ol>

Collect monitors relations POST

Get all (or some of) the monitors relations which start from a role of which a user is a member (either directly or indirectly).

Query Parameters

id?array<>

Only return monitors relations with one of the specified ids

deviceId?array<>

Only return monitors relations with one of the specified device ids

Response Body

application/json

application/json

application/json

curl -X GET "https://api.eniris.be/v1/role/0/monitors"
{
  "monitors": [
    {
      "id": 0,
      "roleId": 0,
      "deviceId": 0,
      "monitorManagement": true,
      "reads": [
        "string"
      ],
      "edits": [
        "string"
      ]
    }
  ]
}
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Missing or misformatted query parameter or body"
}
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Failed to verify token"
}

Get the monitors relations which start from roles of which the user is a member and which are in the specified list of role ids. The POST /v1/role/{roleId}/monitors/query is a preferable alternative which can better handle complex filters.

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.