The set-admin-alias operation allows you to change the settings of an additional administrator’s account on your server.

Request Packet Structure

A request contains the set-admin-alias operation node:

<packet>
<server>
 <set-admin-alias>
 ...
 </set-admin-alias>
</server>
</packet>

The set-admin-alias node is presented by the complex type AdminAliasSetType (plesk_server.xsd) and structured as follows:

image 75895

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is required. It specifies the filtering rule. Data type: AdminAliasFilterType (plesk_server.xsd). This node contains the following nodes:
    • The login node is required. It specifies the login of an additional administrator. Data type: string. This node can be used several times for editing multiple accounts.
  • The data node is required. It contains a collection of settings that will be set for the filtered user accounts. Data type: AdminAliasInfoType (plesk_server.xsd). This node contains the following nodes:
    • The login node is optional. It specifies the login of the additional administrator. Data type: string.
    • The password node is optional. It specifies the password of the additional administrator. Data type: string.
    • The email node is optional. It specifies the email of the additional administrator. Data type: emailType.
    • The contact node is optional. It specifies the contact name of the additional administrator. Data type: string.
    • The comment node is optional. It specifies some comment. Data type: string.
    • The status node is optional. It the status of an additional administrator account (true means that account is active, false means that the account is inactive). Data type: boolean. The default value is true.

Response Packet Structure

The set-admin-alias node of the response packet is structured as follows:

image 75897

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the result of the set-admin-alias operation. Data type: resultType (common.xsd). This node contains the following nodes:
    • The status node is required. It returns the execution status of the operation. Data type: result_status. Allowed values: ok | error.
    • The errcode node is required if the operation fails. Returns error code. Data type: unsignedInt.
    • The errtext node is is required if the operation fails. Returns error message. Data type: string.

Samples

This request changes login, password, email and contact for an additional administrator account with the login user2:

<?xml version="1.0" encoding="UTF-8" ?>
<packet>
<server>
 <set-admin-alias>
  <filter>
   <login>user2</login>
  </filter>
  <data>
   <login>user_new</login>
   <password>Password_123</password>
   <email>contact@example.net</email>
   <contact>John Doe</contact>
 </data>
 </set-admin-alias>
</server>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <server>
    <set-admin-alias>
      <result>
        <status>ok</status>
      </result>
    </set-admin-alias>
  </server>
</packet>