SmartgridOne logo
SmartgridOne 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
POST
/v1/role/query

Authorization

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.

Update an existing role PUT

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.

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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

filter?

Only return those roles which match each of the specified filters

userRights?

Response Body

application/json

application/json

application/json

curl -X POST "https://api.eniris.be/v1/role/query" \  -H "Content-Type: application/json" \  -d '{}'
{
  "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)

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