Chapter 8. User Roles API

8.1. List User’s Roles

8.1.1. Description

List currently logged in user’s roles.

8.1.2. Endpoint

  • uri - /box/srv/1.1/admin/role/list
  • method - POST

8.1.3. Request Body

{}

8.1.4. Response Body

8.1.4.1. Success

{
  "status": "ok",
  "list": ["sub", "dev"]
}

8.1.4.2. Error

{
  "status": "error",
  "message": "<error_message>"
}

8.2. List User’s Assignable Roles

8.2.1. Description

List currently logged in user’s assignable roles, that is, roles that this user can assign to others.

8.2.2. Endpoint

  • uri - /box/srv/1.1/admin/role/listAssignable
  • method - POST

8.2.3. Request Body

{}

8.2.4. Response Body

8.2.4.1. Success

{
  "status": "ok",
  "list": ["sub", "dev", "devadmin", "analytics", "portaladmin"]
}

8.2.4.2. Error

{
  "status": "error",
  "message": "<error_message>"
}