Glance Portal API - Roles (0.1)

Download OpenAPI specification:Download

API endpoints for managing roles

Roles

Returns list of roles

Get the list of roles for the group

Authorizations:
BearerAuth
path Parameters
groupId
required
integer

The group ID (Must be a positive unsigned integer)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new role

Create a new role for the group

Authorizations:
BearerAuth
path Parameters
groupId
required
integer

The group ID (Must be a positive unsigned integer)

Request Body schema: application/json
required
Array
name
string

Name of the new role (Must be no longer than 70 characters)

description
string

Description of the new role (Must be no longer than 255 characters)

object (RoleSettings)

Role settings

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Update roles

Update roles in a group

Authorizations:
BearerAuth
path Parameters
groupId
required
integer

The group ID (Must be a positive unsigned integer)

Request Body schema: application/json
required
Array
roleId
required
integer

Role ID

name
required
string

Role's name (Must be no longer than 70 characters)

description
string

Role's description (Must be no longer than 255 characters)

object (RoleSettings)

Role settings

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "status": "ok"
}

Return information for specific role

Get information about a specific role

Authorizations:
BearerAuth
path Parameters
groupId
required
integer

The group ID (Must be a positive unsigned integer)

roleId
required
integer

the id of the role

Responses

Response samples

Content type
application/json
{
  • "roleId": 0,
  • "name": "string",
  • "description": "string",
  • "inUse": true,
  • "userCount": 0,
  • "settings": {
    }
}

Delete roles

Delete roles in a group. The role must not have any users attached to it.

Authorizations:
BearerAuth
path Parameters
groupId
required
integer

The group ID (Must be a positive unsigned integer)

Request Body schema: application/json
required
Array
integer

Responses

Request samples

Content type
application/json
[
  • 100,
  • 200,
  • 300
]

Response samples

Content type
application/json
{
  • "status": "ok"
}