Getting Permission Descriptors
Use the get-permission-descriptor operation to retrieve descriptor of permissions you can set for roles. For details on descriptors, refer to the Retrieving Permission Descriptors section.
Request Packet Structure
A request XML packet retrieving descriptor of permissions includes the get-permission-descriptor operation node:
<packet version="1.6.3.0">
<role>
<get-permission-descriptor>
...
</get-permission-descriptor>
</role>
</packet>
This operation retrieves a permissions descriptor for a particular Panel
user. The get-permission-descriptor node (site.xsd
) has the
following graphical representation:
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.
-
filter, required
It specifies a filtering rule. Data type: RoleSelectionPermissionFilter (
site.xsd
). -
owner-guid, required
It specifies a role owner GUID. Data type: string.
Response Packet Structure
The get-permission-descriptor node of the output XML packet is structured as follows:
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 operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. It is used to return the error code when the operation fails. Data type: unsignedInt.
- The errtext node is optional. Can be used to return the error message if the operation fails. Data type: string.
- The filter-id node is optional. It is required if the operation succeeds. Returns a filtering rule specified 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 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.
Samples
The request packet retrieving permissions for the customer with ID 5 looks as follows:
<packet version ="1.6.3.0">
<role>
<get-permission-descriptor>
<filter>
<owner-guid>5</owner-guid>
</filter>
</get-permission-descriptor>
</role>
</packet>
A response from the server can look as follows:
<packet version="1.6.3.0">
<role>
<get-permission-descriptor>
<result>
<status>ok</status>
<filter-id>5</filter-id>
<id/>
<descriptor>
<property>
<name>userManagement</name>
<type>boolean</type>
<default-value>false</default-value>
<writable-by>admin</writable-by>
<writable-by>client</writable-by>
</property>
...
</descriptor>
</result>
</get-permission-descriptor>
</role>
</packet>