Sofar logo
Sofar logo
Api
Delete a member relation DELETECollect member relations (replaced by POST /v1/role/{roleId}/member/query) GETCollect member relations POSTCreate or update a member relation PUTUpdate an existing member relation PUT
Member
PUT
/v1/role/{roleId}/member/{memberId}

A user can only execute this action if he is a member of an authorizing role which satisfies one of the following conditions: The authorizing role has direct or indirect userManagement rights for the role to which a member is updated The authorizing role has indirect roleManagement rights for the role to which a member is updated

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*integer

Id of the role of the updated member relation

Range0 <= value
memberId*integer

Id of the updated member relation

Range0 <= value

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://api.eniris.be/v1/role/0/member/0" \  -H "Content-Type: application/json" \  -d '{}'
{
  "member": {
    "id": 0,
    "roleId": 0,
    "userEmail": "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"
}

Create or update a member relation PUT

Create a member relation (or update the existing one) between a role and a user email<br><br> A user can only execute this action if he is a member of an authorizing role which satisfies one of the following conditions: <ul> <li> The authorizing role has *direct or indirect* userManagement rights for the role to which a member is added (or updated) </li> <li> The authorizing role has *indirect* roleManagement rights for the role to which a member is added (or updated) </li> <ul>

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>