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

NameTypeRequiredConstraintsDescription
homeIdintegerYesThe unique ID for a home.
moduleIdstringYesThe unique ID for a smart module.
collectionIdstringYesCollection ID. It must be unique per home.
counterIdstringYesCounter ID. It must be unique per collection.

Query parameters

NameTypeRequiredConstraintsDescription
areaIdsstringYesSpecify the list of area IDs to search counted history associated with the areas. The areaIds parameter allows multiple values, separated by commas (",").
beginstringNoThe beginning time of the data entries. The format follows RFC3339. It's required when the ts is not specified.
endstringNoThe end time of the data entries. The format follows RFC3339. It's required when the ts is not specified.
tsstringNoThe point in time (in RFC3339) to fetch data entries from.

Responses

200 The requested historical counted data entries are returned.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
collectionIdstringYesread-only (server-generated)Identifier of the GeoTSDB collection.
counterIdstringNoread-only (server-generated)Identifier of the object counter.
dataarray<object>Yesread-only (server-generated)The array of count data per area.
Properties of data
PropertyTypeRequiredConstraintsDescription
areaIdstringNoread-only (server-generated)The area ID of the count data.
countnumberNoread-only (server-generated)The the number of object in the area.
timestampstringNoread-only (server-generated)Time in RFC3339 format.
timestampstringYesread-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

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

404 Any requested historical object counted data entries are not found.

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.