Sofar logo
Sofar logo
API
Collect roles (replaced by POST /v1/role/query) GETCreate a new role and the manages relation which connects this role to its parent POSTCollect roles (alternative of GET /v1/role) POSTUpdate an existing role PUT
Role
GET
/v1/role

/.well-known/openid-configuration GET

Previous Page

Create a new role and the manages relation which connects this role to its parent POST

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 newly created child role.

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

Query Parameters

viewId?integer

Only return those roles which have access to a specific view

Range0 <= value
id?array<>

Only return roles with one of the specified ids

name?array<>

Only return roles with a name in this array

ancestorRoleId?array<>Deprecated

Only return roles which are managed (directly or indirectly) by one of the specified ancestor role ids. Prefer the companyId query parameter

companyId?array<>

Only return roles which are directly or indirectly manages by one of the specified company ids

userRights.roleManagement?boolean

For each of the returned roles, set the roleManagement property to indicate whether the user has direct or indirect roleManagement rights

userRights.userManagement?boolean

For each of the returned roles, set the userManagement property to indicate whether the user has direct or indirect userManagement rights

userRights.viewManagement?boolean

For each of the returned roles, set the viewManagement property to indicate whether the user has direct or indirect viewManagement rights

userRights.deviceManagement?boolean

For each of the returned roles, set the deviceManagement property to indicate whether the user has direct or indirect deviceManagement rights

userRights.reportManagement?boolean

For each of the returned roles, set the reportManagement property to indicate whether the user has direct or indirect reportManagement rights

userRights.alarmManagement?boolean

For each of the returned roles, set the alarmManagement property to indicate whether the user has direct or indirect alarmManagement rights

Response Body

application/json

application/json

application/json

curl -X GET "https://api.eniris.be/v1/role"
{
  "role": [
    {
      "id": 0,
      "name": "string",
      "selfRights": {
        "roleManagement": true,
        "userManagement": true,
        "viewManagement": true,
        "deviceManagement": true,
        "reportManagement": true,
        "alarmManagement"











{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Missing or misformatted query parameter or body"
}
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Failed to verify token"
}

Get all (or some of) the roles of which a user is a member (either directly or indirectly). The POST /v1/role/query is a preferable alternative, which can better handle complex filters.

:
true
},
"userRights": {
"roleManagement": true,
"userManagement": true,
"viewManagement": true,
"deviceManagement": true,
"reportManagement": true,
"alarmManagement": true
}
}
]
}