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
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
projectId | integer | Yes | The unique ID for a specified project. | |
entityId | string | Yes | Entity ID (unique within project) | |
counterId | string | Yes | Unique ID of object counter |
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
begin | string | No | The beginning time of the data entries. The format follows RFC3339. | |
end | string | No | The end time of the data entries. The format follows RFC3339. | |
includeDescendants | boolean | No | Set 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
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
counterId | string | No | The unique identifier of the counter. | |||||||||||||||||||||
data | array<object> | Yes | Time-series data. Each entry contains the timestamp of the value 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
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
404 The requested data does not exist or is not accessible.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |