Filtering is the way the request XML packet indicates the object (a web user or several) to which the operation is be applied. The request XML packet filters web user accounts using a special <filter> section.

Parameters, nested in the filter node are called filtering rule. A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node. A single operation can use only parameters of the same type in the filtering rule. There are two kinds of filters.

The first filter matches all web users from the specified site. This filter is used in get-prefs and set-prefs operations. It is presented by type WebUserOwnFilter (webuser.xsd) and structured as follows:

image 34126

  • The site-id node is required. It specifies ID of the site from which you want to select all web users. data type: integer.
  • The site-name node is required. It specifies the site name from which you want to select all web users. Data type: string.

The second filter extends the first filter. In addition it matches web user accounts by either by id or login name. This filter is used in get, set and del operations. It is presented by type WebUserFilter (webuser.xsd) and structured as follows:

image 34127

  • The id node is required. It specifies the ID of a web user. data type: integer.
  • The login name is required. It specifies the login name of the web user. Data type: string.
  • The site-id node is required. It specifies the ID of the site from which you want to select all web users. data type: integer.
  • The site-name node is required. It specifies the site name from which you want to select all web users. Data type: string.

Remarks

A single filter can specify multiple web user accounts defined either by the ID or name in the first case, and either by the ID, name, site-id or site-name in the second.

For example, a packet that retrieves information about web users with IDs 1, 2 and 3 looks as follows:

<packet version="1.4.2.0">
<webuser>
<get>
   <filter>
      <id>1</id>
      <id>2</id>
      <id>3</id>
   </filter>
</get>
</webuser>
</packet>

image 34379

If an operation in a request packet( del, set, get-prefs, set-prefs) uses filters, the filter-id node is nested in a response packet. It returns the filtering rule parameter. If one of the following values was set as a filter rule parameter, it is returned in the filter-id node of the response packet.

  • web user ID
  • web user login name
  • site ID
  • site name

It is done to trace the request parameters in case of error. Data type: anySimple.