Retrieving Descriptor of Permissions

Use the get-permission-descriptor operation to retrieve permissions descriptors of service plans. For details on descriptor, refer to the Representation of Object Descriptors section. For details on permissions of service plans, refer to the Permissions section.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving service plan permissions includes the get-permission-descriptor operation node:

<packet>
<service-plan>
   <get-permission-descriptor>
   ...
   </get-permission-descriptor>
</service-plan>
</packet>

The get-permission-descriptor node is presented by type DomainTemplateGetInputType (domain_template.xsd). Its graphical representation is as follows:

get-permission-descriptor-input

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

 

Response Packet Structure

The get-permission-descriptor node of the output XML paket is of type DomainTemplateDescriptorOutput (domain_template.xsd) which is structured as follows:

get-permission-decsriptor-outputc

 

Samples

The following packet retrieves permissions descriptor for a service plan:

<packet>
<service-plan>
<get-permission-descriptor>
   <filter>
      <name>base_plan</name>
   </filter>
</get-permission-descriptor>
</service-plan>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <service-plan>
    <get-permission-descriptor>
      <result>
        <status>ok</status>
        <name>base_plan</name>
        <descriptor>
          <property>
            <name>manage_sh_access</name>
            <type>boolean</type>
            <default-value>false</default-value>
            <writable-by>admin</writable-by>
            <writable-by>reseller</writable-by>
            <label>Can allow access only to a chrooted environment</label>
            <extension>
              <level>reseller</level>
              <level>domain</level>
              <level>mail</level>
            </extension>
          </property>
...
        </descriptor>
      </result>
    </get-permission-descriptor>
  </service-plan>
</packet>

A single filter can specify multiple plans, all specified either by ID or by name.

<packet>
<service-plan>
<get-permission-descriptor>
   <filter>
      <name>base_plan</name>
      <name>quick_plan</name>
   </filter>
</get-permission-descriptor>
</service-plan>
</packet>