User Guide

Special filter scenarios 23
About sort filters
You can use a filter of the type sort to sort data in ascending and descending order. For example,
the following filter sorts the
name field in ascending order:
sort-name=asc
The following code sorts the name field in descending order:
sort-name=desc
You can also perform primary and secondary sorts. For example, when calling the principal-
list
action to list principals, you can do a primary sort on the type field, and then a secondary
sort on the
name field (this way, all principals of a specific type are grouped together and sorted by
name in each group).
You can do this by specifying the following parameters:
sort1-type=asc&sort2-name=desc
Special filter scenarios
The following scenarios for filtering data vary for each action. For specific information about sort
and filter options for individual actions, see their entries in Chapter 4, “XML API Reference,” on
page 41.
Filtering data that has a type field
You can filter out or display only entries with a combination of matching types. For example, the
following filter displays only the types
folder and meeting:
filter-type=folder&filter-type=meeting
The following example shows all types except folder and meeting:
filter-out-type=folder&filter-out-type=meeting
If the type field allows a null value, you might want to filter out entries with null and non-null
values. The following example shows only types that are
null:
filter-type=null
The following example shows only types that are not null:
filter-out-type=null
Filtering data based on the date of a record
The following example shows all records whose date modified is between July 1 and July 10:
filter-lt-date-modified=2004-07-10T10:00:00.000-07:00&filter-gt-date-
modified=2004-07-1T10:00:00.000-07:00