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
PUT
/v1/role/{roleId}

Authorization

accessBearerAuth

Collect roles (alternative of GET /v1/role) POST

Get all (or some of) the roles of which a user is a member (either directly or indirectly)

Collect telemetry data POST

Execute up to 1000 telemetry queries

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 which we want to update

Range0 <= value

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*not unknown

Role name

selfRights*

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://api.eniris.be/v1/role/0" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "selfRights": {      "roleManagement": true,      "userManagement": true,      "viewManagement": true,      "deviceManagement": true,      "reportManagement": true,      "alarmManagement": true    }  }'
{
  "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"
}
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "User does not have sufficient rights"
}

A user can only execute this action if he is a member of an autorizing role which has indirect roleManagement rights for the updated role.

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