24
Chapter 2: Working with Filters
Filter reference
Filters are comprised of a
type
(either
filter
or
sort
) with an optional
modifier
, the name of the
field
, if needed, and finally, the
value
of the field name, as shown in the following example:
Type-Modifier-FieldName=Value
The following table lists all the filter types and modifiers you can use with Breeze:
Testing code in the browser
You can enter a test URL in the address field of a browser window and see the XML response
from the server. It is a good idea to become comfortable with filters in the browser before you
write code.
There are many nuances to filters that determine which types of filters you can use with certain
API calls. The browser approach lets you quickly try combinations to see what works and what
doesn’t. If you try this outside the browser, you add the extra time of compiling, loading the result
in your application server, and debugging to see if a filter works as you expect. Using a browser,
on the other hand, is much faster and gives you immediate feedback.
For example, you could use the following URL and filter to find all courses with the word “filter”
in the name and the word “date” in the course description. This example URL uses
breezedev.mycompany.com
as the server name and
myf1rst@pp^
for the API access key. Make
sure you log on to the server first, and then enter the following URL, substituting your server
name for
breezedev.mycompany.com
and your API access key for
myf1rst@pp^
:
http://breezedev.mycompany.com/api/xml?accesskey= myf1rst@pp^&action=report-
my-courses&filter-like-name=filter&filter-like-description=date
Type
Modifier
Description
filter
(none)
Field must match value exactly.
filter
like
Field must contain value.
filter
out
Field cannot contain value.
filter
rows
Limits the return result to number of rows specified in value. Does not use the
field name.
filter
start
Limits the return result to number of rows specified in value. Does not use the
field name.
filter
gt
Selects all items greater than the value. Works only with dates.
filter
lt
Selects all items greater than the value. Works only with dates.
filter
gte
Selects all items greater than or equal to the value. Works only with dates.
filter
lte
Selects all items less than or equal to the value. Works only with dates.
sort
(none)
Sorts results. Value must be
asc
or
desc
.
Summary of Contents for BREEZE-USING THE BREEZE XML WEB SERVICES
Page 1: ...Using the Breeze XML Web Services...
Page 8: ...8 Contents...
Page 12: ...12 Introduction Before You Begin...
Page 26: ...26 Chapter 2 Working with Filters...
Page 36: ...36 Chapter 3 Common Tasks...
Page 112: ...112 Chapter 4 Action Reference...
Page 186: ...186 Chapter 5 XML Results Reference...
Page 196: ...196 Index...