Update an existing monitors relation. To execute this query, the user must be a member of an authorizing role which satisfies both of the following conditions: One of the following role-related conditions is true: The authorizing role has direct or indirect deviceManagement rights for the role from which the monitors relation is updated The authorizing role has indirect roleManagement rights for the role from which the monitors relation is updated The authorizing role has monitorManagement rights for the device to which the monitors relation is updated
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
Path Parameters
Id of the role of the updated monitors relation
0 <= valueId of the updated monitors relation
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api.eniris.be/v1/role/0/monitors/0" \ -H "Content-Type: application/json" \ -d '{ "monitorManagement": true, "reads": [ "string" ], "edits": [ "string" ] }'{
"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"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "User does not have sufficient rights"
}{
"statusCode": 409,
"error": "Conflict",
"message": "The monitors relation cannot be updated, since it is the only monitors relation of the device which allows monitorManagement rights, and the proposed change would revoke these rights, resulting in a device with uneditable monitors relations."
}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>
/.well-known/jwks.json GET
Next Page
