Retrieving Protected Directory User Settings

Use the get-user operation to retrieve protected directory user settings.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving protected directory user settings includes the get-user operation node:

<packet version="1.5.2.0">
<protected-dir>
<get-user>
...  
</get-user>
</protected-dir>
</packet>

 

The get-user node is presented by type ProtectedDirGetUserInput (protected_dir.xsd), and its graphical representation is as follows:

  • The filter node is required. It specifies the filtering rule. For details, refer to the Available Filters section. Data type: ProtectedDirUserFilter (protected_dir.xsd).
 

Response Packet Structure

The delete-user node of the output XML packet is presented by type ProtectedDirGetUserOutput (protected_dir.xsd) and structured as follows:

  • The result node is required. It wraps the response retrieved from the server. Data type: resultFilterType (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. Is returns the error code if the operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the operation fails. Data type: string.
  • The filter-id node is required if the request packet is valid. It returns the filtering rule parameter. For details, refer to the Available Filters section. Data type: anySimple.
  • The id node is required if the operation succeeds. It returns the ID of the protected directory user. Data type: integer.
  • The data node is required if the operation succeeds. It contains protected user settings. Data type: complex.
  • The login node is required if the operation succeeds. It contains the protected user login. Data type: string.

 

 

Samples

Retrieving settings of a single protected directory user

The packet that retrieves settings of the protected directory user with ID 1 looks as follows:

<packet>
<protected-dir>
    <get-user>
      <filter>
         <id>1</id>
      </filter>
    </get-user>
  </protected-dir>
</packet>

Response:

<packet>
<protected-dir>
    <get-user>
      <result>
         <status>ok</status>
         <filter-id>1</filter-id>
         <id>1</id>
         <data>
           <login>user</login>
         </data>
      </result>
    </get-user>
  </protected-dir>
</packet>

 

If the user was not found, the response from the server looks as follows:

<protected-dir>
  <get-user>
    <result>
     <status>error</status>
     <errcode>1013</errcode>
     <errtext>User is not found</errtext>
     <filter-id>1</filter-id>
    </result>
  </get-user>
</protected-dir>
Retrieving settings of multiple protected directory users

The packet that retrieves settings of all users of the protected directory with ID 1 looks as follows:

<packet>
<protected-dir>
    <get-user>
      <filter>
         <pd-id>1</pd-id>
      </filter>
    </get-user>
  </protected-dir>
</packet>

Response:

<packet>
<protected-dir>
    <get-user>
      <result>
         <status>ok</status>
         <filter-id>1</filter-id>
         <id>131</id>
         <data>
           <login>GuestUser</login>
         </data>
      </result>
      <result>
         <status>ok</status>
         <filter-id>1</filter-id>
         <id>132</id>
         <data>
           <login>MyUser</login>
         </data>
      </result>
    </get-user>
  </protected-dir>
</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.