2.9.2. User Configuration API
2.9.2.1. user — Get user settings
Section titled “2.9.2.1. user — Get user settings”GET /api/config/user| Request Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
Response example
{ "id": 0, "username": "admin", "isAdmin": true}| Response Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
| username | String | (Required) Username |
| isAdmin | Bool | (Required) Whether the user has administrator privileges |
| roles | String[] | Functional role list (page permissions) for non-administrator users. Not returned if not set. |
2.9.2.2. users — Get all user settings
Section titled “2.9.2.2. users — Get all user settings”This API has no request parameters.
GET /api/config/usersResponse example
[ { "id": 0, "username": "admin", "isAdmin": true }, { "id": 1, "username": "user1", "isAdmin": false }]| Response Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
| username | String | (Required) Username |
| isAdmin | Bool | (Required) Whether the user has administrator privileges |
| roles | String[] | Functional role list (page permissions) for non-administrator users. Not returned if not set. |
2.9.2.3. create-user — Create a new user
Section titled “2.9.2.3. create-user — Create a new user”When no password is provided, the new user’s initial password is the same as the username.
POST /api/config/create-userRequest body example application/json
{ "username": "user2", "isAdmin": false}| Request Parameter | Type | Description |
|---|---|---|
| username | String | (Required) Username |
| isAdmin | Bool | Whether the user has administrator privileges. Defaults to true. |
| roles | String[] | Functional role list (page permissions) for non-administrator users. Not set if omitted. |
| password | String | Initial password. Defaults to the username when omitted. The password is never returned in the response. |
Response example
{ "id": 2, "username": "user2", "isAdmin": false}| Response Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
| username | String | (Required) Username |
| isAdmin | Bool | (Required) Whether the user has administrator privileges |
| roles | String[] | Functional role list (page permissions) for non-administrator users. Not returned if not set. |
2.9.2.4. update-user — Update user settings
Section titled “2.9.2.4. update-user — Update user settings”Changing the username does not change the password.
POST /api/config/update-userRequest body example application/json
{ "id": 2, "username": "user2", "isAdmin": false}| Request Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
| username | String | Username. Not changed by default. |
| isAdmin | Bool | Whether the user has administrator privileges. Not changed by default; however, when this user is the last remaining administrator in the system, isAdmin: true must be sent explicitly, otherwise INVALID_CONFIG_SETTING (At least one admin.) is returned. |
| roles | String[] | Functional role list (page permissions) for non-administrator users. Not changed by default. |
Response example
{ "id": 2, "username": "user2", "isAdmin": false}| Response Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
| username | String | (Required) Username |
| isAdmin | Bool | (Required) Whether the user has administrator privileges |
| roles | String[] | Functional role list (page permissions) for non-administrator users. Not returned if not set. |
2.9.2.5. delete-user — Delete a user
Section titled “2.9.2.5. delete-user — Delete a user”GET /api/config/delete-user| Request Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
Response example
{ "errorCode": 0, "errorMsg": "Success"}| Response Parameter | Type | Description |
|---|---|---|
| errorCode | Int32 | (Required) Error code. 0 indicates success. |
| errorMsg | String | (Required) Error message |
2.9.2.6. user-security — Get user security settings
Section titled “2.9.2.6. user-security — Get user security settings”GET /api/config/user-security| Request Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
Response example
{ "id": 2, "secretKey": "sk-XXXXXXXXXX", "authorizedApis": "prefix,/cnc;prefix,/db;prefix,/analysis;prefix,/group-analysis;prefix,/config;prefix,/core;prefix,/gateway;prefix,/auth;"}| Response Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
| secretKey | String | The secret key, prefixed with “sk-”. Not returned if not set. |
| authorizedApis | String | Authorized APIs, i.e. the APIs the user is allowed to use. Not returned if not set. For the API command format, see API Command Format. |
2.9.2.7. update-user-security — Update user security settings
Section titled “2.9.2.7. update-user-security — Update user security settings”POST /api/config/update-user-securityRequest body example application/json
{ "id": 2, "secretKey": "sk-XXXXXXXXXX", "authorizedApis": "prefix,/cnc;prefix,/db;prefix,/analysis;prefix,/group-analysis;prefix,/config;prefix,/core;prefix,/gateway;prefix,/auth;"}| Request Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
| secretKey | String | The secret key, prefixed with “sk-”. The key must be unique across all users; a duplicate returns GENERAL_CONFIG_DUPLICATE_VALUE (Secret key already exists.). |
| authorizedApis | String | Authorized APIs, i.e. the APIs the user is allowed to use. Not returned if not set. For the API command format, see API Command Format. |
Response example
{ "id": 2, "secretKey": "sk-XXXXXXXXXX", "authorizedApis": "prefix,/cnc;prefix,/db;prefix,/analysis;prefix,/group-analysis;prefix,/config;prefix,/core;prefix,/gateway;prefix,/auth;"}| Response Parameter | Type | Description |
|---|---|---|
| id | Int32 | (Required) Database identifier, see 1.1.4. ID Database Identifier |
| secretKey | String | The secret key, prefixed with “sk-”. Not returned if not set. |
| authorizedApis | String | Authorized APIs, i.e. the APIs the user is allowed to use. Not returned if not set. For the API command format, see API Command Format. |

Scan for support on WeChat
© BIVROST TECHNOLOGIES Company Limited / 深圳市彼络科技有限公司 · Gateway Protocol v1.19.7 · Tel: 18824672282