Use the get-permission-descriptor operation to retrieve descriptor of user permissions over a certain subscription. For details on descriptors, refer to the Representation of Object Descriptor section. to learn more about the permissions, refer to the Permissions section.

Request Packet Structure

A request XML packet retrieving descriptor of permissions for subscription users includes the get-permission-descriptor operation node:

<packet version="1.6.3.0">
<webspace>
   <get-permission-descriptor>
   ...
   </get-permission-descriptor>
</webspace>
</packet>

You can retrieve a descriptor for specified subscriptions or the server-level descriptor of permissions. The get-permission-descriptor node has the following graphical representation:

image 66374

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is required. It specifies a filtering rule. For info on filters, refer to the Filters of Descriptors section. Data type: domainFilterType (domain_input.xsd).

Response Packet Structure

The get-permission-descriptor node of the output XML packet is structured as follows:

image 40129

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the response retrieved from the server. Data type: ResultFilterType (plesk_common.xsd).
  • The status node is required. It specifies the execution status of the get-permission-descriptor operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It is used to return the error code when the get-permission-descriptor operation fails. Data type: unsignedInt.
  • The errtext node is optional. Can be used to return the error message if the get-permission-descriptor operation fails. Data type: string.
  • The filter-id node is optional. It is required if the get-permission-descriptor operation succeeds. Returns either subscription name, subscription ID, customer name, or customer ID depending on a way of descriptor’s specification in the request packet. For info on filters, refer to the Filters of Descriptors section. Data type: anySimple.
  • The id node is optional. It is required if the get-permission-descriptor operation succeeds. Returns the unique identifier of the subscription. Data type: integer.
  • The descriptor node is optional. It specifies the object descriptor. For details, refer to Representation of Object Descriptor. Data type: string.

Note: This descriptor contains permissions extensions. For details, refer to the Extension of Permissions Descriptor section.

Samples

The request packet retrieving permissions descriptor for the subscription with ID 5 looks as follows:

<packet version ="1.6.3.0">
<webspace>
   <get-permission-descriptor>
      <filter>
         <id>5</id>
      </filter>
   </get-permission-descriptor>
</webspace>
</packet>

Response:

<packet version="1.6.3.0">
  <webspace>
    <get-permission-descriptor>
      <result>
        <status>ok</status>
        <filter-id>MyDomain.com</filter-id>
        <id>10</id>
          <property>
            <name>manage_sh_access</name>
            <type>boolean</type>
            <default-value>false</default-value>
            <writable-by>admin</writable-by>
            <label>cl_perm__manage_sh_access</label>
            <extension>
              <level>client</level>
              <level>domain</level>
            </extension>
          </property>
          ...
          <property>
            <name>manage_dashboard</name>
            <type>boolean</type>
            <default-value>true</default-value>
            <writable-by>admin</writable-by>
            <writable-by>client</writable-by>
            <label>cl_perm__manage_dashboard</label>
            <extension>
              <level>client</level>
              <level>domain</level>
            </extension>
          </property>
        </descriptor>
      </result>
    </get-permission-descriptor>
  </webspace>
</packet>

The request packet retrieving permissions descriptor for subscriptions with ID 5 and ID 7 looks as follows:

<packet version ="1.6.3.0">
<webspace>
   <get-permission-descriptor>
      <filter>
         <name>5</name>
         <name>7</name>
      </filter>
   </get-permission-descriptor>
</webspace>
</packet>

The request packet retrieving permissions descriptor for subscriptions of the customer specified by ID 3 looks as follows:

<packet version ="1.6.3.0">
<webspace>
   <get-permission-descriptor>
      <filter>
         <owner-id>3</owner-id>
      </filter>
   </get-permission-descriptor>
</webspace>
</packet>

The request packet retrieving the server-level descriptor of permissions for subscription users looks as follows:

<packet version ="1.6.3.0">
<webspace>
   <get-permission-descriptor>
      <filter/>
   </get-permission-descriptor>
</webspace>
</packet>