Links

Count Objects

You can count the total number of objects of a given type as follows:
Relative URL
HTTP Request Method
/api/v4/backend-deployment-id/objects/model/count.json
GET
Replace model with the type of object that you wish to retrieve (as defined in your app's Data Model), for example person, job or asset.

Example

BASE-URL
The below examples contain a BASE-URL placeholder. Please refer to the HTTP Endpoints section to get the base URL relevant to your deployment.
Count the number of task objects:
HTTP
curl
ruby
GET BASE-URL/api/v4/533bda53027894f69b001055/objects/tasks/count.json
curl "BASE-URL/api/v4/533bda53027894f69b001055/objects/tasks/count.json" \
-u "533bda53027894f69b001055:7Ajj5htRY1uzw7b4w23V"
require 'rest-client'
journey = RestClient::Resource.new "BASE-URL/api/v4", "533bda53027894f69b001055", "7Ajj5htRY1uzw7b4w23V"
journey["533bda53027894f69b001055/objects/tasks/count.json"].get
Response
{"count":3,"type":"task"}
You can also count the number of objects returned by a query.