User role (role)
Description
The role available for specifying in the list of user roles.
Allows you to bind access permissions to REST-API and websocket-API (routes) , as well as to role-based web applications to it (webapps).
The user assigned to the role has access to the specified APIs and web applications.
In particular with the help of user roles it is possible to form role models based on dynamic classes and their corresponding role applications.
Supports inheritance.
The entire set of roles with lists of groups and users to which they are assigned is available via the API roles_caches.
Fields
{
"id": uuid,
"name": str,
"description": str,
"parent_id": uuid,
"routes": array<object>,
"opts": {
"title": str,
"comment": str
},
"security": object,
"ext": {
"ct": date,
"lwt": date
}
}
Specification | Description |
---|---|
Field: |
Identifier. Can be specified at creation, otherwise generated by the system. |
Field: |
Role Name (lowercase Latin). |
Field: |
Description |
Field: |
Identifier of the base group whose settings are fully copied. |
Field: |
List of allowed endpoints API. Each item in the list represents an object: { "url": ..., "method": [...] } A specific endpoint must be specified as the url. Supported:
Endpoints are differentiated within each collection:
Or "/rest/v1/model/my/test/**" - all endpoints of the collection, except the endpoint of the collection itself. Methods: "GET", "POST", "PUT", "PATCH", "DELETE", "LOOKUP", "HEAD", "CLEAR", "*", "WEBSOCKET". There are other non-standard methods for specific endpoints. For example, the "INVITEBYIVR" method is used to create a call on behalf of an IVR. These are listed in the API description of specific endpoints. Such methods are included in "*" or should be specified separately. The "WEBSOCKET" method is used to provide access to various websocket APIs. The specific API module is specified behind the hash in the "url" (see example below). Example: [ { "url": "/rest/v1/model/my/test", "methods": ["GET","CLEAR"] }, { "url": "/rest/v1/model/my/test/*", "methods": ["GET","PUT","PATCH","DELETE"] }, { "url": "/rest/v1/model/my/test/**", "methods": ["*"] }, { "url": "/ws#subscr", "methods": ["WEBSOCKET"] } ] |
Field: |
List of nested user groups. Defined by identifiers. |
Field: |
|
Field: |
Arbitrary header |
Field: |
Arbitrary comment |
Field: |
Allows you to extend the compound with arbitrary keys and values. |
Field: |
Allows you to extend the compound with arbitrary keys and values. |
Field: |
Object creation time |
Field: |
Time of last modification of the object |