REST API Query Parameters (Reference)

General Syntax   Top

[ item ]

means that this part of the syntax is optional


[item, ....]

means that the item can be repeated


item1 | item2

the | means you can use either Item1 or Item2 in the query


+

combines multiple conditions (single or double quotes are required if the condition value contains a space)


-

negates any query by prefacing the field name with a -. Example a <= search, when negated, becomes >


( )

parenthesis around searches sets the order of precedence


Numeric Field Parameters   Top

Conditions used in queries vary based on variable type. The following is a generalized list for numeric fields:

field:value
  • means the field equals the specified value
  • null can be used as value

field:>value

means the field is greater than the specified value


field:>=value

means the field is greater than or equal to the specified value


field:<value

means the field is less than the specified value


field:<=value

means the field is less than or equal to the specified value


field:value1..value2

means the field must be between value1 and value2


field:[value1, value2, value3]
  • means the field must be one of value1, value2, or value3
  • no space is required because the fields are numeric

Character Field Parameters   Top

Conditions used in queries vary based on variable type. The following is a generalized list for character fields:

field:=value
  • means the field equals the specified value using case sensitive match (e.g. first_name:=Bob will find Bob, but not bob)
  • null can be used as value

field:*value*

means the field contains the specified value where * is a wildcard that matches any characters (case insensitive) before and/or after value (e.g. first_name:bob will find Bob, bob, bobby, and bebob)


field:'value'

means the field is like the specified value using a case insensitive search where the value can have spaces (e.g. first_name:'bob 5' will find Bob 5 or bob 5 but NOT bobby)


field:[value1, value2, value3]
  • means the field is one of value1 or value2 or value3, case insensitive (e.g. first_name:[bob, ted, alice] will find bob, Bob, ted, tED, AliCe)
  • uses postgres ilike comparator
  • a space is required after each comma

search:['value1', 'value2']

means the field does a postgres text search on the data in the endpoint (e.g. search:["Bob", "art"] will find Bob, Bobbie, Art and Arts Management Systems because it searches in both name and company fields)


Boolean Field Parameters   Top

Conditions used in queries vary based on variable type. The following is a generalized list for boolean fields:

field:value

means the field equals the specified value, which is either true, false, or null


Date Field Parameters   Top

Conditions used in queries vary based on variable type. The following is a generalized list for date fields:

field:value
  • means the field equals the specified value
  • value specified in yyyy-mm-dd format or null

field:>value
  • means the field is greater than the specified value
  • value specified in yyyy-mm-dd format

field:>=value
  • means the field is greater than or equal to the specified value
  • value specified in yyyy-mm-dd format

field:<value
  • means the field is less than the specified value
  • value specified in yyyy-mm-dd format

field:<=value
  • means the field is less than or equal to the specified value
  • value specified in yyyy-mm-dd format

field:value1..value2
  • means the field must be between value1 and value2
  • value specified in yyyy-mm-dd format

field:[value1, value2, value3]
  • means the field must be one of value1 or value2 or value3
  • value specified in yyyy-mm-dd format

Pagination Parameters   Top

There are some parameters that you can use to limit the amount of data:

`page=XX`

shows the XXth page of data, based on a default page size of 25 rows of data per page (e.g. page=2 will show rows 26 to 50)


`page_size=YY`
  • alters the page size from 25 rows of data per page to YY rows of data per page
  • can be used in conjunction with the page=XX parameter

`page_size=all`

removes any page size limit for the query when displaying via html


`split_size=ZZ`

splits the page results


`page_size=all&stream=1`

This is a very special combination of parameters that creates a continuous stream of all data and returns it from the API as fast as it can. Any program requesting data using this parameter needs be be able to parse the data in real time, as fast as it can, because it could return a rather large set of data. It should not be used for viewing data.


Packed Seq Field Lists   Top

These are special de-normalized lists of record connections (e.g. bought for plays, belongs to mail lists, associated with tags) where the specific record can be associated with multiple other records. A patron can belong to many mail lists. A play, donation campaign, or patron can be associated with many tags. Searching for records with these markers can provide access to an arbitrary group of data, such as searching for all events with a tag.