Resource Roles#

The Roles resource represents the roles a school user can have. Currently there are exactly three roles supported: staff, student and teacher. A user has either one of those roles or the combination of staff and teacher.

The resource objects have no direct representation in LDAP. They are only required to classify user objects.

The item list of the Roles resource is hard coded. It does only support listing objects. It does not support creating, modifying or deleting roles.

Roles resource representation#

The following JSON is an example Roles resource in the UCS@school Kelvin REST API:

{
    "display_name": "staff",
    "name": "staff",
    "url": "https://<fqdn>/ucsschool/kelvin/v1/roles/staff"
}
Property description#

name

value

Description

Notes

display_name

string

The name of the role (for views).

read only

name

string

The name of the role (technically).

read only

url

URL

The URL of the role object in the UCS@school Kelvin API.

read only

Roles retrieve#

Example curl command to retrieve a single role:

$ curl -X GET "https://<fqdn>/ucsschool/kelvin/v1/roles/student"\
    -H "accept: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJh...."

The queried role must exist, matching is case-sensitive. The response body will be the second element of the list in the example above.