[POST] .../v1/role/get
Returns information about roles. Use this method to retrieve RBAC roles before assigning them to users or groups or before editing role permissions. The response returns paginated Role rows with id, name, description, last_update, next_offset and total; the request body is required and supports filters id, name and description while ids/search fields. The caller must have role get permission 9 and search is applied to role name and description when it is longer than the server search threshold. Missing body, denied permission, invalid filters or sorting and database errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| limit | Int32 | Optional | Maximum number of records to return. Server-side defaults and limits are controlled by server settings. |
| offset | Int32 | Optional | Offset from the beginning of the result set. |
| search | String | Optional | Search string for the name and description fields. |
| sort_orders | Array of Role_SortOrder | Optional | Output parameter sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| description | string | |
| id | int | Role IDs. |
| name | string |
Sortable Fields
| Field |
|---|
| description |
| id |
| last_update |
| name |
Request Example
{
"filters": [
{
"Field": "name",
"Operator": "Like",
"Value": "cash"
}
],
"sort_orders": [
{
"column": "name",
"direction": "ASC"
}
],
"limit": 50,
"offset": 0
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| next_offset | Int32 | Offset for the next data page. |
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of Role | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [
{
"id": 4,
"name": "Cashier",
"description": "POS operator role",
"last_update": 1712345600
}
],
"next_offset": 0,
"total": 1
}