Most API endpoints have “list” API methods that allow you to retrieve a large set of data (e.g. list Activist Codes, list Survey Question, etc.). These endpoints share a common pattern for requests and responses.
Paginated endpoints accept the following optional parameters:
Parameter | Location | Type | Description |
---|---|---|---|
| query | int | A limit on the number of records to return in a single request, similar to a page size. This can be a value between 1 and the maximum |
| query | int | The number of records in a collection that should be skipped and not included in the result. If specified, must be greater than or equal to 0. For example, if you have a collection of 100 items and specify a |
| query | string | A comma-delimited list of expansion properties (see Expansion) |
| query | string | A comma-delimited list of properties and sort direction ( |
Paginated endpoints share a common response format as well. The endpoints will return an object with the following properties:
Property | Type | Description |
---|---|---|
| array | An array of zero or more endpoint specific objects (e.g., an Activist Code) |
| int | Total number of items available at this endpoint using the filters specified. This can be greater than the number of items in the |
| string | An absolute URL at which additional records can be retrieved, if additional records are available. This will be the same as the request’s URL but with adjusted or appended |
If no results are returned, an HTTP Status Code 200 OK
is returned with the items
array empty, count
property equal to 0, and the nextPageLink
null:
{
"items": [],
"nextPageLink": null,
"count": 0
}