Sofar logo
Sofar logo
API
Delete a manages relation DELETECollect manages relations (replaced by POST /v1/role/{parentRoleId}/manages/query) GETCollect manages relations POSTCreate or update a manages relation PUTUpdate an existing manages relation PUT
Manages

Delete a manages relation DELETE

Delete a specified manages relation. If the child role of the manages relation was only connected to the rest of the role graph by the deleted relation, this child role will be deleted as well. In that case, a cascade of deletions of nodes and relations in the graph may occur. A user can only execute this action if he is a member of an autorizing role which has (direct or indirect) roleManagement rights for the parent role of the manages relation

Collect manages relations POST

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

GET
/v1/role/{parentRoleId}/manages

Get all (or some of) the manages relations which start from a role of which a user is a member (either directly or indirectly). The POST /v1/role/{parentRoleId}/manages/query is a preferable alternative which can better handle complex filters.

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

parentRoleId*|array<>|

Query Parameters

id?array<>
childRoleId?array<>

Response Body

application/json

curl -X GET "https://api.eniris.be/v1/role/0/manages"

application/json

application/json

Only return manages relations with one of the specified ids

Only return manages relations with one of the specified child role ids

{
  "manages": [
    {
      "id": 0,
      "parentRoleId": 0,
      "childRoleId": 0,
      "roleManagement": true,
      "userManagement": true,
      "viewManagement": true,
      "deviceManagement": true,
      "reportManagement": true,
      "alarmManagement": true
    }
  ]
}
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Missing or misformatted query parameter or body"
}
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Failed to verify token"
}