๐Roles
This page provides a description of the available API routes for managing roles.
Last updated
This page provides a description of the available API routes for managing roles.
Last updated
The PORTOS system has a predefined list of user rights. Role allows to combine multiple user rights. When assigning rights to the user, roles are used. The role is represented by Role
class. Roles can be freely managed using API routes described in this section.
For instance, a user possessing the "sale" role would be granted rights such as ticketCreate
, ticketUpdate
, and ticketClose
. Roles can be used to group user rights based on areas of work or represent specific job positions like "cashier," "waiter," or "manager."
During product installation, the default roles setup is established, and it follows a more detailed approach, allowing precise role management, such as "sale", "stats", "storno," etc.
GET
http://{server-address}/roles
Returns all roles that matches query parameters. Result is of type QueryResult<Role>
.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
GET
http://{server-address}/roles/{name}
Result is of type Role.
POST
http://{server-address}/roles
Creates new role. Result is of type Role.
Required rights
Authorized user must have RoleCreate
right assigned.
PUT
http://{server-address}/roles/{name}
Updates existing or creates new role. Result is of type Role.
Required rights
Authorized user must have assigned RoleCreate
or RoleUpdate
right.
DELETE
http://{server-address}/roles/{name}
Required rights
Authorized user must have RoleDelete
right assigned.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
name
string
Supports NData syntax.
label
string
Supports NData syntax.
$skip
int
Pagination property. Describing number of records to skip from beginning of result collection.
$take
int
Pagination property. Maximum count of items to be returned.
$sort
string[]
Comma separated list of property names. Please see NData syntax.
$count
bool
If set to true
, response will not contain items
collection. Use to get resource count, not the resources themselves.
Authorization*
string
Authorization header with authorization token.
name*
string
Unique role name.
Authorization*
string
Authorization header with authorization token.
Authorization*
string
Authorization header with authorization token.
(body)*
Role
Role model to create
name*
string
Unique role name.
Authorization*
string
Authorization header with authorization token.
(body)*
Role
Model to create or update.
name*
string
Unique role name.
Authorization*
string
Authorization header with authorization token.