The following information describes how to filter Data REST API results.
/apps-basic/secure/org/data/{app-uid}/{form-id}?F_Amount__lt=1000
This
sample query would limit results to records whose F_Amount currency field
value is less than 1000. The syntax of a single filter parameter is
{element}__{operator}={value}, where {element} is the ID
of an item in the form, or one of the record metadata properties. For example, the
author_name is used to filter by the name of the initial submitter of a record.
For example, the colon in a time value of “09:40” would need to be encoded as %3A resulting in an encoded value of 09%3A40.
F_Age__equals=5
author_name__equals=James%20Smith
?{element1}__{operator1}={value1}&{element2}__{operator2}={value2}&searchOperator=OR
?{element1}__{operator1}={value1}&{element2}__{operator2}={value2}&searchOperator=AND
Element | Operator Type | Description |
---|---|---|
author_name | See the table of String Operators | The name of the user that initially created the record. |
updater_name | The name of the user that last updated the record. | |
creation_time | See the table of Time Stamp Operators | The time stamp of when the record was initially created. |
updated | The time stamp of when the record was last updated | |
flow_state | See the table of Stage Operators | The ID of the stage that the record is in. For example, “ST_End” |
Operator | Description |
---|---|
equals | The value of the element is tested for equality against the specified value. |
startswith | Checks to see whether the value of the element starts with the specified value. |
endswith | Checks to see whether the value of the element ends with the specified value. |
contains | Checks to see whether the value of the element contains the specified value. |
Operator | Description |
---|---|
equals | The value of the element is tested for equality against the specified value. |
notequals | The value of the element is tested for non-equality against the specified value. |
gt | Checks to see whether the value of the element is greater than the specified value. |
lt | Checks to see whether the value of the element is less than the specified value. |
gte | Checks to see whether the value of the element is greater than or equal to the specified value. |
lte | Checks to see whether the value of the element is less than or equal to the specified value. |
Operator | Description |
---|---|
equals | The value of the element is tested for equality against the specified value. Valid values to compare against are true and false. |
Operator | Description |
---|---|
after | Filters so that the results provided come after the specified time and date. |
before | Filters so that the results provided come before the specified time and date. |
between | Filters so that the results provided fit on or within the specified times and dates. The
between operator takes a value in the following format:
For example, to
search between the start of day 1 June 2015 and the start of day 8 June 2015 (in Pacific Daylight
Time) the value
is:
|
To adjust for different time zones, use the tzOffset URL parameter. The value is the number of seconds of offset from Coordinated Universal Time. For example, for Pacific Standard Time use tzOffset=-28000
Operator | Description |
---|---|
year | Filters the results so that the year matches the specified numerical value. |
month | Filters the results so that the month matches the specified numerical value. The value must use the numbers 1-12, where 1 is January and 12 is December. |
day | Filters the results so that the day matches the specified numerical value. The value must use the numbers 1-31, where each numeral matches a day of the month. |
Operator | Description |
---|---|
equals | The value of the flow_state is tested for equality against the specified value. |
notequals | The value of the flow_state is tested for non-equality against the specified value. |
The following parameters are examples of filtering. Each example contains the search parameter and a description of the returned result.
?F_Number__gte=5&to=20
?updated__between=2015-06-01T00%3A00%3A01%2B8%3A00A*N*D2015-08-31T00%3A00%3A01%2B8%3A00&to=30
?F_Currency__lt=1000&F_Number__gt=10&searchOperator=AND&to=5
?F_Number__lt=5&F_Number__gt=10&searchOperator=OR&to=20