API Collection Filters

The OneAll API provides provides a generic system to apply filters on collections. Not all endpoints support filters. Please refer to the individual documentation of each endpoint for more information on the supported filters.

To filter a collection, simply add the filters=[field]:[operator]:[value] query parameter to the url of the endpoint and make sure to URL encode the value. Multiple filters may be specified by separating each filter by a semicolon.

In the example below, the API returns the discussions that are not closed and where the discussion title contains the string hello world.

GET /loudvoice/discussions.json?filters=is_closed:eq:false;title:ct:hello+world

Fields

If filtering is available for an endpoint, the supported fields are indicated in the documentation of that endpoint.

Operators

The following operators are supported by the API.

Operator Description
ct Returns entries where the field contains the value.
nct Returns entries where the field does not contain the value.
bw Returns entries where the field begins with the value.
nbw Returns entries where the field does not begin with the value.
ew Returns entries where the field ends with the value.
new Returns entries where the field does not end with the value.
eq Returns entries where the field is equal to the value.
neq Returns entries where the field is not equal to the value.
gt Returns entries where the field is greater than the value.
gte Returns entries where the field is greater than or equal to the value.
lt Returns entries where the field is lower than the value.
lte Returns entries where the field is lower than or equal to the value.

Values

Specify the value to be used in the filter and make sure to URL encode it.

User Contributed Notes