User roles (roles)
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new user role
Request
Field description: role entity
POST /rest/v1/domain/roles HTTP/1.1
Content-Type: application/json; charset=utf-8
role entity
Response
Field description: role entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "afafafaf-0178-3fc1-67fc-7cd30a921f58",
"name": "testrole",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"routes": [
{
"methods": [ "*" ],
"url": "/rest/v1/model/abc/def"
},
{
"methods": [ "GET", "LOOKUP" ],
"url": "/rest/v1/model/abc/zzzzzzzzz"
},
{
"methods": ["WEBSOCKET"],
"url": "/ws#rest"
}
],
"webapps": [],
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-03-20T10:37:03.82Z",
"lwt": "2021-03-20T10:41:42.25Z"
}
}
Getting the list of user roles
Request
| Name | Type | Description |
|---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, name, description, parent_id, routes, opts.title, opts.comment, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to output. |
|
|
Maximum number of resources in the list. |
|
|
Sorting order of resources in the list. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/domain/roles?offset=0&limit=2 HTTP/1.1
Response
Field description: role entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "afafafaf-0178-3fc1-67fc-7cd30a921f58",
"name": "testrole",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"routes": [
{
"methods": [ "" ],
"url": "/rest/v1/model/abc/def"
},
{
"methods": [ "GET", "LOOKUP" ],
"url": "/rest/v1/model/abc/zzzzzzzzz"
},
{
"methods": ["WEBSOCKET"],
"url": "/ws#rest"
}
],
"webapps": [],
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-03-20T10:37:03.82Z",
"lwt": "2021-03-20T10:41:42.25Z"
}
},
{
"id": "abcdef00-05b7-8163-948c-3392a9660db9",
"name": "xxx",
"description": "",
"parent_id": "afafafaf-0178-3fc1-67fc-7cd30a921f58",
"routes": [
{
"methods": [
"GET"
],
"url": "/rest/v1/uc/*"
}
],
"webapps": [],
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-03-22T20:22:25.26Z",
"lwt": "2021-03-22T20:22:25.26Z"
}
}
]
Getting user role data
Request
| Name | Type | Description |
|---|---|---|
|
|
List of fields to output. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/domain/roles/afafafaf-0178-3fc1-67fc-7cd30a921f58 HTTP/1.1
Response
Field description: role entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "afafafaf-0178-3fc1-67fc-7cd30a921f58",
"name": "testrole",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"routes": [
{
"methods": [ "*" ],
"url": "/rest/v1/model/abc/def"
},
{
"methods": [ "GET", "LOOKUP" ],
"url": "/rest/v1/model/abc/zzzzzzzzz"
},
{
"methods": ["WEBSOCKET"],
"url": "/ws#rest"
}
],
"webapps": [],
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-03-20T10:37:03.82Z",
"lwt": "2021-03-20T10:41:42.25Z"
}
}
Modifying user role data
Fields prohibited for modification: id
Request
Field description: role entity
PATCH /rest/v1/domain/roles/afafafaf-0178-3fc1-67fc-7cd30a921f58 HTTP/1.1
Content-Type: application/json; charset=utf-8
role entity
Response
Field description: role entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "afafafaf-0178-3fc1-67fc-7cd30a921f58",
"name": "testrole",
"description": "",
"parent_id": "00000000-0000-0000-0000-000000000000",
"routes": [
{
"methods": [ "*" ],
"url": "/rest/v1/model/abc/def"
},
{
"methods": [ "GET", "LOOKUP" ],
"url": "/rest/v1/model/abc/zzzzzzzzz"
},
{
"methods": ["WEBSOCKET"],
"url": "/ws#rest"
},
{
"methods": ["WEBSOCKET"],
"url": "/ws#subscr"
}
],
"webapps": [],
"opts": {
"title": "",
"comment": "New comment"
},
"ext": {
"ct": "2021-03-20T10:37:03.82Z",
"lwt": "2021-03-20T10:41:42.25Z"
}
}