The add-admin-alias operation allows you to create an additional administrator’s account on your server.

Request Packet Structure

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

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

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

image 75889

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 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 required. It specifies the login of the additional administrator. Data type: string.
  • The password node is required. It specifies the password of the additional administrator. Data type: string.
  • The email node is required. It specifies the email of the additional administrator. Data type: emailType.
  • The contact node is required. 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 add-admin-alias node of the response packet is structured as follows:

image 75891

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 add-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 creates an additional administrator account:

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

Response:

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

Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.