Create a monitor for a home
POST/homes/{homeId}/smartModules/{moduleId}/monitors
Base URL: https://api.tinkermode.com
Create a monitor for this home.
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. |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
condition | one of 2 | No | read-only (server-generated) | Monitor Condition object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of the following 2 shapes: Variant 1 Heartbeat monitoring condition against data points in a time series.
Variant 2 Threshold-based monitoring condition against static data points in a time series
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | No | read-only (server-generated) | Monitor description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enabled | boolean | No | read-only (server-generated) | Whether this monitor is enabled | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
evaluationDelay | integer | No | read-only (server-generated); min: 0 | How long the monitor evaluation should be delayed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
homeId | integer | No | read-only (server-generated) | Home that this monitor belongs to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | integer | No | read-only (server-generated) | Identifier of monitor | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
incidentCustomDescriptions | object | No | User defined incident descriptions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
isAlerting | boolean | No | read-only (server-generated) | If true, some or all of the monitoring targets are in alert state | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
issue | string | No | read-only (server-generated) | issue of monitor setting | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
modificationTime | string | No | read-only (server-generated); format: date-time | Timestamp of modification. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
moduleId | string | No | read-only (server-generated) | Smart Module that this monitor belongs to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name | string | No | read-only (server-generated) | Monitor name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
projectId | integer | No | read-only (server-generated) | Project that this monitor belongs to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request example
{
"condition": {
"conditionType": "timeSeriesThreshold",
"interval": 120,
"seriesId": "room1_humidity"
},
"description": "humidity monitor",
"enabled": true,
"evaluationDelay": 60,
"name": "humidity monitor"
}Responses
201 Monitor successfully created
Content type: application/json
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
condition | one of 2 | No | read-only (server-generated) | Monitor Condition object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of the following 2 shapes: Variant 1 Heartbeat monitoring condition against data points in a time series.
Variant 2 Threshold-based monitoring condition against static data points in a time series
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | No | read-only (server-generated) | Monitor description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enabled | boolean | No | read-only (server-generated) | Whether this monitor is enabled | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
evaluationDelay | integer | No | read-only (server-generated); min: 0 | How long the monitor evaluation should be delayed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
homeId | integer | No | read-only (server-generated) | Home that this monitor belongs to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | integer | No | read-only (server-generated) | Identifier of monitor | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
incidentCustomDescriptions | object | No | User defined incident descriptions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
isAlerting | boolean | No | read-only (server-generated) | If true, some or all of the monitoring targets are in alert state | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
issue | string | No | read-only (server-generated) | issue of monitor setting | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
modificationTime | string | No | read-only (server-generated); format: date-time | Timestamp of modification. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
moduleId | string | No | read-only (server-generated) | Smart Module that this monitor belongs to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name | string | No | read-only (server-generated) | Monitor name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
projectId | integer | No | read-only (server-generated) | Project that this monitor belongs to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 invalid data or 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. |
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. |