Retrieving Web Users Preferences

Use the get operation to retrieve preferences common for all users of a certain site. These settings automatically will be applied to a new user added to the site. Web users preferences are of more priority than web user settings. For more information on the settings, refer to the Retrieving Web Users Settings and Web User Settings and Preferences sections.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving preferences of web users includes the get-prefs operation node:

<packet version="1.4.2.0">
<webuser >
   <get-prefs>
   ...
   </get-prefs>
</webuser>
</packet>

 

The get-prefs node is presented by type WebUserGetPrefInputType (webuser.xsd), and its graphical representation is as follows:

Remarks

You can retrieve preferences of web users using different filtering rules in a single packet. Add as many get-prefs operations as the number of different filtering rules to be used.

<packet version="1.4.2.0">
<get-prefs>
...
</get-prefs>
...
<get-prefs>
...
</get-prefs>
</packet>

 

 

Response Packet Structure

The get-prefs node of the output XML packet is presented by type WebUserGetPrefOutputType (webuser.xsd) and structured as follows:

 

 

Samples

Retrieving preferences a web user

This packet retrieves preferences of all web users of the site with ID 5. The packet can look as follows:

<packet>
<webuser>
<get-prefs>
   <filter>
      <site-id>5</site-id>
   </filter>
</get-prefs>
</webuser>

Response:

<packet>
<webuser>
<get-prefs>
   <result>
      <status>ok</status>
      <filter-id>5</filter-id>
      <id>5</id>
      <wuscripts>true</wuscripts>
   </result>
</get-prefs>
</webuser> 
Retrieving preferences of multiple sites

This packet retrieves preferences of all web users of sites example.com and example2.com. The request packet looks as follows:

<packet>
<webuser>
<get-prefs>
   <filter>
      <site-name>example.com</site-name>
      <site-name>example2.com</site-name>
   </filter>
</get-prefs>
</webuser>

Response:

<packet>
<webuser>
<get-prefs>

   <result>
      <status>error</status>
      <errcode>1015</errcode>
      <errtext>Domain does not exist</errtext>
      <filter-id>example.com</filter-id>
   </result>

   <result>
      <status>ok</status>
      <filter-id>example2.com</filter-id>
      <id>6</id>
      <wuscripts>true</wuscripts>
   </result>

</get-prefs>
</webuser>