Get historical counted time series data
GET/homes/{homeId}/smartModules/{moduleId}/collections/{collectionId}/counts/{counterId}
Base URL: https://api.tinkermode.com
Get historical counted data specified by area IDs. Use comma-separated areaIds string in query
parameters to fetch the records per each value Use the begin and end parameters to fetch
entries by time range. Use the ts parameters to fetch one entry before a point in time.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user, service account, or project API key.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
homeId | integer | Yes | The unique ID for a home. | |
moduleId | string | Yes | The unique ID for a smart module. | |
collectionId | string | Yes | Collection ID. It must be unique per home. | |
counterId | string | Yes | Counter ID. It must be unique per collection. |
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
areaIds | string | Yes | Specify the list of area IDs to search counted history associated with the areas. The areaIds parameter allows multiple values, separated by commas (",").
| |
begin | string | No | The beginning time of the data entries. The format follows RFC3339. It's required when the ts is not specified. | |
end | string | No | The end time of the data entries. The format follows RFC3339. It's required when the ts is not specified. | |
ts | string | No | The point in time (in RFC3339) to fetch data entries from. |
Responses
200 The requested historical counted data entries are returned.
Content type: application/json
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
collectionId | string | Yes | read-only (server-generated) | Identifier of the GeoTSDB collection. | ||||||||||||||||||||
counterId | string | No | read-only (server-generated) | Identifier of the object counter. | ||||||||||||||||||||
data | array<object> | Yes | read-only (server-generated) | The array of count data per area. | ||||||||||||||||||||
| ||||||||||||||||||||||||
timestamp | string | Yes | read-only (server-generated) | Time in RFC3339 format. | ||||||||||||||||||||
Response example
{
"collectionId": "office",
"counterId": "number_of_tools",
"data": [
{
"areaId": "sfo_office",
"count": 40,
"timestamp": "2023-03-25T09:00:00+09:00"
},
{
"areaId": "tyo_office",
"count": 12,
"timestamp": "2023-03-25T09:00:00+09:00"
}
]
}401 Authorization is required to access this resource.
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 Any requested historical object counted data entries are not found.
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. |