Create a time series

POST/homes/{homeId}/smartModules/{moduleId}/timeSeries

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

Create a new time series for this home. Normally a time series is automatically created when data points are first injected. However, such time series are automatically defaulted to the UTC time zone. Time series that are meant to be in a specific time zone should be explicitly created with this endpoint ahead of time, before any data points are injected. The request body must contain the id and timeZone fields.

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.

Request body

Content type: application/json

PropertyTypeRequiredConstraintsDescription
homeIdintegerNoread-only (server-generated)Home that this time series belongs to.
idstringNoread-only (server-generated); pattern: ^[a-zA-Z0-9]([a-zA-Z0-9\-_\:]*[a-zA-Z0-9])*$Time Series ID. Must be unique within each home. Must be 1 or more alphanumeric characters and may contain dashes ('-'), underscores ('_'), and colons (':') may be used after the first character but must be followed by 1+ alphanumeric characters.
moduleIdstringNoread-only (server-generated)ID of Smart Module that created this time series.
timeZonestringNoread-only (server-generated)If present, time series is associated with a time zone that is not UTC. This should be a time zone name defined in the IANA TZ Database.

Request example

{
  "id": "room1_humidity",
  "timeZone": "Asia/Tokyo"
}

Responses

201 Time series successfully created.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
homeIdintegerNoread-only (server-generated)Home that this time series belongs to.
idstringNoread-only (server-generated); pattern: ^[a-zA-Z0-9]([a-zA-Z0-9\-_\:]*[a-zA-Z0-9])*$Time Series ID. Must be unique within each home. Must be 1 or more alphanumeric characters and may contain dashes ('-'), underscores ('_'), and colons (':') may be used after the first character but must be followed by 1+ alphanumeric characters.
moduleIdstringNoread-only (server-generated)ID of Smart Module that created this time series.
timeZonestringNoread-only (server-generated)If present, time series is associated with a time zone that is not UTC. This should be a time zone name defined in the IANA TZ Database.

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 invalid data or denied permission.

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.