Roles
Introduction
Roles connect users to a primary department, module permissions, extended department access, and optional additional attributes.
Model Definition
Alias
role
Relations
List
List visible Roles.
Definition
GET /api/roles
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
limit
integer
No limit
Maximum number of roles.
Example Request
Example Response
Show
Show one visible Role.
Definition
GET /api/roles/{role}
Route Parameters
role
integer
Role ID.
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
Example Request
Example Response
Availability Information
Show availability information for Roles.
Definition
GET /api/roles/availability-information
Request Keys
department_ids
array or comma-separated integers
All departments
Departments for which availability is calculated.
Example Request
Example Response
Create
Create a new Role.
Definition
POST /api/roles
Request Keys
name*
string
-
Unique role name.
active
boolean
true
Whether users may use the role.
location_key
string | null
null
Optional location identifier.
sort_number
integer
Auto
Order within the folder.
department_ids
array
Primary department
Departments whose content the role may access.
infoboard_department_ids
array
Primary department
Departments available for Infoboard targeting.
quick_task_assignments_department_ids
array
Primary department
Departments available for quick task assignments.
Additional attribute keys
mixed
Defined by set
Values for attached AttributeFields.
Keys with * are required for creation.
Behavior
The authenticated user becomes user_id. The example supplies every relationship collection and additional-attribute value used to configure the new role.
Example Request
Example Response
Update
Update an existing Role.
Definition
PUT /api/roles/{role}
Route Parameters
role
integer
Role ID.
Request Keys
name*
string
-
Unique role name.
active
boolean
true
Whether users may use the role.
location_key
string | null
null
Optional location identifier.
sort_number
integer
Auto
Order within the folder.
department_ids
array
Primary department
Departments whose content the role may access.
infoboard_department_ids
array
Primary department
Departments available for Infoboard targeting.
quick_task_assignments_department_ids
array
Primary department
Departments available for quick task assignments.
Additional attribute keys
mixed
Defined by set
Values for attached AttributeFields.
Example Request
Example Response
Delete
Delete an existing Role.
Definition
DELETE /api/roles/{role}
Route Parameters
role
integer
Role ID.
Example Request
Example Response
Last updated