Change an Administrator Account

Request Parameters

Parameter

Description

Mandatory

add-group

ID of a group an administrator will get access to.

This parameter can be repeated any number of times per request to specify multiple groups at a time.

no

delete-group

ID of a group an administrator will no longer have access to.

This parameter can be repeated any number of times per request to specify multiple groups at a time.

no

description

Description

no

id

ID of an administrator account, parameters of which will be changed

yes

last-name

Surname

no

login

Administrator account login

no

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

no

readonly

Restriction of administrator account privileges.

Valid values: yes | no. By default: no.
If the parameter is set as yes, an administrator will have read-only privileges (see Appendix A2. Administrator Privileges).

no

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

 

An administrator cannot change the may-create-admin, readonly, and group parameters for their own account.

 

Request Example

https://192.168.1.1:9081/api/admins/change.ds?id=adm3&login=newadm3&password=root&name=name&last-name=last-name&middle-name=middle-name&description=description&add-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="13.00.0.202005090" status="true">
  <administrator id="adm3"/>
</drweb-es-api>

 

Description of XML Response Parameters

The <administrator /> element contains an ID of modified administrator account.

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": "13.00.0.202005090",
      "uuid": "eae1a652-96d5-48fd-9169-4788a03688b8"}},

"data": {
    "id": "adm3"}}

 

Description of JSON Response Parameters

The data block contains an ID of modified administrator account.

The data block element:

Field name

Description

id

Account ID