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
POST
/v1/role/{roleId}/monitors/query

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

Authorization

accessBearerAuth
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

Path Parameters

roleId*|array<>|

Request Body

application/json

Some filters, each of which must be valid for all returned monitors relations

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.eniris.be/v1/role/0/monitors/query" \  -H "Content-Type: application/json" \  -d '{}'
{
  "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"
}

Collect monitors relations (replaced by POST /v1/role/{roleId}/monitors/query) GET

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.

Create or update a monitors relation PUT

Create a monitors relation (or update the existing one) between a role and a device.<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 created (or updated) </li> <li> The authorizing role has *indirect* roleManagement rights for the role from which the monitors relation is created (or updated) </li> </ul> </li> <li> The authorizing role has monitorManagement rights for the device to which the monitors relation is created </li> </ol>

filter?

Only return those monitors relations which match each of the specified filters