Changing Administrator Parameters

Request Parameters

Parameter

Description

Valid values

Note

add-group

Identifier of a group which an administrator will access

Required parameter: no.

The parameter can be defined in the request as many times as you like to specify multiple groups at a time.

delete-group

Identifier of a group to which an administrator access will be denied

Required parameter: no.

The parameter can be defined in the request as many times as you like to specify multiple groups at a time.

description

Description

Required parameter: no

id

Identifier of an administrator account which parameters will be changed

Required parameter: yes

last-name

Surname

Required parameter: no

login

Administrator account login

Required parameter: no

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

readonly

A flag to restrict administrator account permissions

yes | no

Required parameter: no.

By default is no.
If the value is set to yes, a read-only account will be created (see the Permissions section).

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.

 

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

 

Request Example

http://192.168.1.1:9080/api/admins/change.ds?id=3&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

<drweb-es-api api_version="4.3.0" timestamp="1558521887" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
  <administrator id="3"/>
</drweb-es-api>

 

Description of XML Response Parameters

The <administrator /> element contains information about modified administrator account.

The <administrator /> element attribute:

Attribute

Description

id

Identifier of the changed account

 

JSON Response Structure

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

    "timestamp": 1558521969,

    "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": "3"}}

 

Description of JSON Response Parameters

The data block contains information about the changed administrator account.

The data block element:

Field name

Description

id

Identifier of the changed account