Updating Web Users Preferences
Use the set-prefs operation to change preferences common for all users of the certain site. These settings automatically will be set for a new user added to the site. Web users preferences are of more priority than web users settings. For more information on the settings, refer to the Retrieving Web Users Settings, and Web User Settings/Preferences sections.
Request Packet Structure
A request XML packet updating preferences of web users includes the set-prefs operation node:
The set-prefs node is presented by type WebUserSetPrefInputType (
webuser.xsd), and its graphical representation is as follows:
- The filter node is required. It specifies the filtering rule. For more information, refer to the Available Filters section. Data type: WebUserOwnFilter (
- The values node is required. It specifies preferences of a site. For more information, refer to the Preferences section. Data type: WebUserPrefs (
You can update preferences of web users using different filtering rules in a single packet. Add as many set-prefs operations as the number of different filtering rules to be used.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The set-prefs node of the output XML packet is presented by type WebUserSetPrefOutputType (
webuser.xsd) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: resultFilterType (
- The status node is required. It specifies the execution status of the set-prefs operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. It returns the error code if the set-prefs operation fails. Data type: unsignedInt.
- The errtext node is optional. It returns the error message if the set-prefs operation fails. Data type: string.
- The filter-id node is required. It returns filtering rule parameter. For more information, refer to the Available Filters section. Data type:anySimpleType.
- The id node is optional. If the set-prefs operation succeeds it holds the id of the updated web user. Data type: integer.
Updating preferences of a single site
The request packet disables scripts execution for all web users of the site with ID 4.
Updating preferences of multiple sites
This request packet disables scripts execution, and sites like username@<site> for all web users of the example.com and example2.com sites.
Response (if example2.com wasn't found on the server):