Request Parameters
Parameter
|
Description
|
Valid values
|
Note
|
description
|
Description
|
–
|
Required parameter: no
|
group
|
Identifier of a group which a newly-created administrator can access
|
–
|
Required parameter: no.
This parameter can be defined in the request several times to specify multiple groups at a time. If this parameter is set in the request, then a group administrator account will be created.
|
id
|
Administrator account identifier
|
Digits, latin characters, and symbols ‘_’, ’-‘
|
Required parameter: no.
If not set, an ID will be generated automatically.
|
last-name
|
Surname
|
–
|
Required parameter: no
|
login
|
Administrator account login
|
|
Required parameter: yes
|
may-create-admin
|
A flag determines the right to create administrators and administrative groups
|
yes | no
|
Required parameter: no.
By default is yes
|
middle-name
|
Middle name
|
–
|
Required parameter: no
|
name
|
Name
|
–
|
Required parameter: no
|
password
|
Password
|
|
Required parameter: no.
If not set, a password will be generated automatically.
|
readonly
|
A flag to create a restricted group administrator account
|
yes | no
|
Required parameter: no.
By default is no. If the flag is set and its value is set to yes, a read-only account will be created (see Permissions).
|
|
If the readonly=yes and may-create-admin=yes parameters are specified simultaneously, the readonly parameter has the priority. I.e. read-only administrator cannot add or change settings of other administrative accounts.
|
Request Example
http://192.168.1.1:9080/api/admins/add.ds?login=newadm1&password=root&name=name&last-name=last-name&middle-name=middle-name&description=description&group=1&readonly=yes&may-create-admin=no
|
XML and JSON response structure examples are described below.
XML Response
<drweb-es-api api_version="4.3.0" timestamp="1558521886" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
<administrator id="f143cc19-e71c-4ec5-b32c-0fc8f4b41706"/>
</drweb-es-api>
|
Description of XML Response Parameters
The <administrator /> element contains information about created administrator account.
The <administrator /> element attribute:
Attribute
|
Description
|
id
|
Identifier of the created account
|
JSON Response Structure
{ "head": {
"status": true,
"timestamp": 1558521886,
"api": {
"version": 40300,
"versionString": 4.3.0},
"server": {
"name": "192.168.1.1",
"version": "12.00.0.201909260",
"uuid": "27671337-e0b0-4f60-aeb0-ab1f2ca47f77"}},
"data": {
"id": "afbff760-4746-449a-af4b-4e9fd43ffc59"}}
|
Description of JSON Response Parameters
The data block contains information about the created administrator account.
The data block element:
Field name
|
Description
|
id
|
Identifier of the created account
|
|