Creating a Role

Use the add operation to create a role.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

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:

role-add-rps.gif

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:

role-add-reps.gif

 

Samples

The following packet adds a role to the customer with GUID ff5e2685-6f44-490f-bdc8-9a46fb2f0308:

<packet version="1.6.3.0">
  <role>
    <add>
    <name>GalaxySpy</name>
    <owner-guid>ff5e2685-6f44-490f-bdc8-9a46fb2f0308</owner-guid>
    </add>
  </role>
</packet>

Reponse:

<packet version="1.6.3.0">
  <role>
    <add>
      <result>
        <status>ok</status>
        <id>61</id>
      </result>
    </add>
  </role>
</packet>