Create an Administrator Account

Request Parameters

Parameter

Description

Mandatory

admin_group

Administrator group identifier which rights will be inherited by the administrator.

no

description

Description

no

group

Identifier of a group an administrator will have access to.

This parameter can be repeated any number of times per request to specify multiple groups at a time.
If this parameter is specified in a request, a new group administrator account will be created.

no

id

Administrator account ID.

Valid values: digits, Latin characters, and symbols ‘_’, ’-‘.
If the ID is not specified, it will be generated automatically.

no

last-name

Surname

no

login

Administrator account login

yes

may-create-admin

Authorization to create administrator accounts, administrator groups.

Valid values: yes | no. By default: yes.

no

middle-name

Middle name

no

name

Name

no

password

Password.

If the password is not specified, it will be generated automatically.

no

readonly

Restriction of administrator account privileges.

Valid values: yes | no. By default: no.
If the parameter is set as yes, a new account with read-only privileges will be created (see Appendix A2. Administrator Privileges).

no

If readonly=yes and may-create-admin=yes are both specified, the may-create-admin parameter will be ignored. Thus, an administrator with read-only privileges can neither add nor change account settings of other administrators.

If admin_group and group parameters are both specified, the last specified parameter will be ignored. To specify which group of anti-virus network the administrator rights are applied to, make the request to change administrator parameters: /api/admins/change.ds?id={administrator id}&add-group={anti-virus network group id}

 

Request Example

https://192.168.1.1:9081/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 Structure

<drweb-es-api api_version="4.3.0" timestamp="1582030255" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
  <administrator id="20a90c15-ba08-e711-387b-a0568a18dd32"/>
</drweb-es-api>

 

Description of XML Response Parameters

The <administrator /> element contains a newly created administrator account ID.

The <administrator /> element attribute:

Attribute

Description

id

Account ID

 

JSON Response Structure

{ "head": {
    "status": true,

    "timestamp": 1582030515,

    "api": {
      "version": 40300,
      "versionString": 4.3.0},

    "server": {
      "name": "192.168.1.1",

      "version": "12.00.0.201909260",
      "uuid": "eae1a652-96d5-48fd-9169-4788a03688b8"}},

"data": {
    "id": "20a90c15-ba08-e711-387b-a0568a18dd32"}}

 

Description of JSON Response Parameters

The data block contains a newly created administrator account ID.

The data block element:

Field name

Description

id

Account ID