Version 2.5 (v2.5)

Filtering

The Administrate API provides a set of filters which are useful for requesting a restricted set of results to avoid further processing and reduce bandwidth. This allows the possiblity to return records between a set of dates, for example, or all those records that belong to a list of ids.

Name Operator Usage
Exactly equal, default __eq attribute__eq=[value]
Not equal __ne attribute__ne=[value]
Less than __lt attribute__lt=[value]
Less than or equal __le attribute__le=[value]
Greater than __gt attribute__gt=[value]
Greater than or equal __ge attribute__ge=[value]
Like, % in query matches any string __lk attribute__lk=[value]
Not Like __nl attribute__nl=[value]
Contains __ct attribute__ct=[value]
Starts with __sw attribute__sw=[value]
Ends with __ew attribute__ew=[value]
In, ie 2 is ‘in’ 1,2,3,4 __in attribute__in=value_1[,value_2]*
Not in __ni attribute__ni=value_1[,value_2]*

Pagination

All endpoints support pagination and will return only 50 records, further records can be accessed by appending the parameter _page to the query for example:

Request Response
GET /api/v2.5/crm/opportunities JSON list of first 50 Opportunities
GET /api/v2.5/crm/opportunities?_page=2 JSON list of second 50 Opportunities
GET /api/v2.5/crm/opportunities?_limit=100 JSON list of first 100 Opportunities
GET /api/v2.5/crm/opportunities?_limit=100&_page=3 JSON list of third 100 Opportunities

Headers are sent to communicate what information is available:

Header Name Description Example Data
X-Pagination-Page Current Page 1
X-Pagination-Pages Available Pages 2
X-Pagination-Per Records per page 50
X-Pagination-Total Total number of records 75

Limiting

You can limit the results of a request using the _limit parameter

Example

curl -k -u <username>:<password> \
     https://YOUR-SUBDOMAIN.administrateapp.com/api/v2.5/crm/opportunities?_limit=10

Order

You can order the results of a request using the _order parameter, which takes one or more attributes to order by. By default this will be in ascending order, to sort in descending order prefix the attribute by ‘-‘.

Example ordered by name in ascending order

curl -k -u <username>:<password> \
     https://YOUR-SUBDOMAIN.administrateapp.com/api/v2.5/crm/opportunities?_order=name&_limit=10

Example ordered by name in descending order

curl -k -u <username>:<password> \
    https://YOUR-SUBDOMAIN.administrateapp.com/api/v2.5/crm/opportunities?_order=-name&_limit=10