POST /user-management/local/users
User access to this controller and to other controllers that are using this controller as their RADIUS server are managed by adding them to the users collection.
When you are adding a new user, the username (need to be unique), password and role are required.
The role is required, you must choose a minimum of one role.
The WelcomePage field is optional.
The WelcomePage field sets the landing page that will be displayed to individual users when they log in to the controller. The URL for any page the controller can serve according to the user’s access rights can be used.
Controllers' IP address or hostname: this should be copied from your Web browser’s address bar when you have successfully navigated to the target page.
Example:
The address for the user default webpage is :
Hostname/config/bacnet.html or 192.168.0.1/config/bacnet.htmlRemove the hostname or IP Address so that the URL becomes
/config/bacnet.html.
The PasswordReset field is optional, the value will be set to TRUE by default.
An http error code 400 will be received if the user name already exists.
If this parameter is not in the request, the Application/Json will be chosen by default.
There are multiple possible values (according the resource):
The first two are the most often used.
There are multiple possible values according the resource:
If this parameter is not present during the request, and error 415 Unsupported Media Type will be thrown.
The Content-Length entity-header field indicates the size of the entity-body.
Object Name: User
Property Name | Type | Description | Method |
---|---|---|---|
Id | Integer | This property is the user's ID | GET |
Username | String | This property is the user's login. 3 to 16 characters. | GET POST PUT |
WelcomePage | String | This property is the user's welcome page. When a user logs into the controller, the first page they will see can be set so they do not have to navigate to that page every time they connect to the controller. The URL is everything after the Port number. | GET POST PUT |
PasswordReset | Boolean | This property is used to indicate if the user need to reset his password.
|
GET POST PUT |
Roles | Array<Role> | This object is an array of Role object. It will contain all the user's role. During a POST/PUT request, to edit user's roles or create a new user, you have to send an array of string : Example : ["Admin","BleRoomDevices_Admin"] |
GET POST PUT |
Password | String | This is the user's password. This value can be used for a POST (create or edit a user) or PUT (edit a user). It will not be displayed with a GET. SHOULD be encoded in Base64. |
POST PUT |
URL Example: https://0.0.0.0/api/rest/v1/user-management/local/users
{
"username": "bryan",
"password": "BprtY78F",
"roles": [
"admin"
],
"welcomePage": "/myCustomLink"
}
URL Example: https://0.0.0.0/api/rest/v1/user-management/local/users
<?xml version="1.0" encoding="utf-8"?>
<User>
<Username>bryan</Username>
<Password>BprtY78F</Password>
<Roles>
<Role>
<Name>Admin</Name>
</Role>
<Role>
<Name>User</Name>
</Role>
</Roles>
</User>