Get object counter history

GET/projects/{projectId}/entities/{entityId}/location/objectCounters/{counterId}/data

Base URL: https://api.tinkermode.com

Get historical data on the number of objects in an area. Use the begin and end parameters to fetch entries for a specific time range. However, if the ts parameter is set, the begin and end parameters will be ignored, and the latest data from ts will be returned.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain a user API key of a user with permission to read the entity location, a service account token with the same permission, or a project API key.

Path parameters

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
entityIdstringYesEntity ID (unique within project)
counterIdstringYesUnique ID of object counter

Query parameters

NameTypeRequiredConstraintsDescription
beginstringNoThe beginning time of the data entries. The format follows RFC3339.
endstringNoThe end time of the data entries. The format follows RFC3339.
includeDescendantsbooleanNoSet this to true to include descendant entities' location. The default is false.

Responses

200 The requested object counter data entries are returned.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
counterIdstringNoThe unique identifier of the counter.
dataarray<object>YesTime-series data. Each entry contains the timestamp of the value in RFC3339 format.
Properties of data
PropertyTypeRequiredConstraintsDescription
areaIdstringYesThe area of the count.
countnumberYesThe number of objects in an area.
timestampstringYesTime in RFC3339 format.

Response example

{
  "counterId": "people",
  "data": [
    {
      "areaId": "mt_fuji",
      "count": 30,
      "timestamp": "2023-01-01T00:00:00Z"
    }
  ]
}

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

404 The requested data does not exist or is not accessible.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.