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:
<packet> <role> <add> ... </add> </role> </packet>
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:
<packet version="220.127.116.11"> <role> <add> <name>GalaxySpy</name> <owner-guid>ff5e2685-6f44-490f-bdc8-9a46fb2f0308</owner-guid> </add> </role> </packet>
<packet version="18.104.22.168"> <role> <add> <result> <status>ok</status> <id>61</id> </result> </add> </role> </packet>
Leave your comments on this page
Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.