Update a monitor for a home
PATCH/homes/{homeId}/smartModules/{moduleId}/monitors/{monitorId}
Base URL: https://api.tinkermode.com
Update a monitor for this home.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain API key of the matching user, or a Project API Key with admin permission.
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. | |
monitorId | string | Yes | Monitor ID |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
condition | one of 2 | No | 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 | Monitor description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enabled | boolean | No | Whether this monitor is enabled | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
evaluationDelay | integer | No | min: 0 | How long the monitor evaluation should be delayed; if this field is omitted when monitor is created, default value 0 will be applied | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
incidentCustomDescriptions | object | No | User defined incident descriptions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name | string | No | Monitor name | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request example
{
"condition": {
"conditionType": "timeSeriesThreshold",
"interval": 120,
"seriesId": "room1_humidity"
},
"description": "humidity monitor",
"enabled": true,
"evaluationDelay": 60,
"name": "humidity monitor"
}Responses
204 The monitor has been successfully updated.
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. |
404 The requested monitor 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. |