Use the set-user operation to change settings of the protected directory user.
A request XML packet changing protected directory user settings includes the set-user operation node:
<packet>
<protected-dir>
<set-user>
...
</set-user>
</protected-dir>
</packet>
The set-user node is presented by type ProtectedDirSetInput (protected_dir.xsd
), and its graphical representation is as follows:
protected_dir.xsd
).protected_dir.xsd
). Its graphical representation is as follows:
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
The set-user node of the output XML packet is presented by type ProtectedDirSetUserOutput (protected_dir.xsd
) and structured as follows:
common.xsd
).
The packet that changes preferences of a protected directory user with ID 1 looks as follows:
<packet>
<protected-dir>
<set-user>
<filter>
<id>1</id>
</filter>
<values>
<password>qweqwe</password>
<password-type>plain</password-type>
</values>
</set-user>
</protected-dir>
</packet>
Response:
<packet>
<protected-dir>
<set-user>
<result>
<status>ok</status>
<filter-id>1</filter-id>
<id>1</id>
</result>
</set-user>
</protected-dir>
</packet>
If the user was not found, the response from the server looks as follows:
<packet>
<protected-dir>
<set-user>
<result>
<status>error</status>
<errcode>1013</errcode>
<errtext>User is not found</errtext>
<filter-id>12</filter-id>
</result>
</set-user>
</protected-dir>
</packet>
If no password was specified in the request packet, the response from the server looks as follows:
<packet>
<protected-dir>
<set-user>
<result>
<status>error</status>
<errcode>1019</errcode>
<errtext>Invalid value for 'password' specified</errtext>
<filter-id>12</filter-id>
</result>
</set-user>
</protected-dir>
</packet>
The packet that changes preferences of all users of the protected directory with ID 1 looks as follows:
<packet>
<protected-dir>
<set-user>
<filter>
<pd-id>1</pd-id>
</filter>
<values>
<password>qweqwe</password>
<password-type>plain</password-type>
</values>
</set-user>
</protected-dir>
</packet>
Response:
<packet>
<protected-dir>
<set-user>
<result>
<status>ok</status>
<filter-id>1</filter-id>
<id>13</id>
</result>
<result>
<status>ok</status>
<filter-id>1</filter-id>
<id>14</id>
</result>
</set-user>
</protected-dir>
</packet>