V1
The JourneyApps API (V1) → 9. Counting, Limiting & Skipping
Counting Objects
You can count the total number of objects of a given type as follows:
Relative URL | HTTP Request Method |
---|---|
/api/v1/object-type/count.format | GET |
Example
Count the number of task
objects:
Response:
You can also count the number of objects returned by a Query. See the Queries/Filtering & Searching section for details.
Limit & Skip
This parameter allows you to control the number of objects that are retrieved in a request.
Relative URL | HTTP Request Method |
---|---|
/api/v1/object-type.format?limit=x | GET |
/api/v1/object-type.format?limit=x&skip=y | GET |
Note: Replace object-type with the type of object that you wish to retrieve (as defined in your app's Data Model), for example 'person', 'job' or 'asset'. Replace format with the response data format (
json
or xml
), or leave it out. Replace the x and y with integers.
Parameters
skip
and limit
parameters are specified as non-negative Integer values.
Response
The response will contain a list of objects numbering no more than the limit
, and offset by the value of skip
. For example, limit=10&skip=10
will skip the first ten objects and return no more than ten objects, i.e. the eleventh through twentieth.
Example
Retrieve the 5th page of 10 objects Retrieve the five most recently modified objects
Next Section:
10. Attribute Representation
Previous Section
Next Section