The add operation is used to create a web user on the certain site. You can specify the web user settings on creation or set them later. By default, new web user account will be created in accordance with preferences set by Plesk Administrator. For information on web user settings and preferences, refer to the Web User Settings and Preferences section.
Request Packet Structure
A request XML packet adding a new web user includes the add operation node:
The add node is presented by type WebUserAddInputType (
webuser.xsd), and its graphical representation is as follows:
- The site-id node is required. It specifies the site on which you want to create a web user. Data type: integer.
- The login node is required. It specifies the login name of the web user. Data type: string.
- The password node is optional. It specifies the web user password. Data type: string (length=4..64).
- The password-type node is optional. It specifies if it is a plain or encrypted password. Data type:string. Allowed values: plain | crypt.
- The ftp-quota node is optional. It specifies the limit of disk space (in bytes) provided for the web user on the server. Data type: integer (-1 = unlimited).
- The services node is optional. It specifies if the available services. To learn more about this node, see Settings. Data type: ServicesType.
Note: The login name should begin with an alphabet character. It cannot contain white spaces. The password cannot contain quotation marks, white space, user's login name, and should be between 5 and 14 characters in length.
Note: The password field can be left blank. If so, the web user is created but cannot login until the administrator creates the password for this user.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
You can add multiple users in a single packet. Use as many add operations as the number of web users to be added.
Response Packet Structure
The add node of the output XML packet is presented by type WebUserAddOutputType (
webuser.xsd) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: resultType (
- The status node is required. It specifies the execution status of the add operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. It returns the error code if the add operation fails. Data type: unsignedInt.
- The errtext node is optional. It returns the error message if the add operation fails. Data type: string.
- The id node is optional. If the add operation succeeds it returns the ID of the added web user.
Adding a web user
The request packet adding a new web user called myWebAccount looks as follows:
If the site was not found on the server, the response can look as follows: