Creating a Role
Use the add operation to create a role.
Request Packet Structure
A request XML packet adding a new webspace to Plesk database includes the add operation node:
The add node is nested within the RoleAddInput type (
role.xsd). The add node has the following graphics representation:
It defines a role name. Data type: string.
It specifies the GUID of a role owner (a customer or the Administrator). If you do not specify this node, the role owner will be the request packet sender. Data type: string. For details on how to get a customer GUID, see the Getting Information About Client Accounts section.
It specifies a collection of permissions granted to a role. Data type: RolePermissions (
role.xsd). See the structure of this node in the Permissions Granted to Roles section.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The add node of the response packet is structured as follows:
It wraps the result of the requested operation. Data type: resultType (
It returns the execution status of the operation. Data type: string. Allowed values:
ok | error.
Is used to return the error code when the operation fails. Data type: unsignedInt.
Can be used to return an error message if the operation fails. Data type: string.
It is required If the operation succeeds. Returns the ID of a new role. Data type: integer.
The following packet adds a role to the customer with GUID ff5e2685-6f44-490f-bdc8-9a46fb2f0308: