Get all incidents in a home
GET/homes/{homeId}/smartModules/{moduleId}/incidents
Base URL: https://api.tinkermode.com
Get the list of all incidents in this home.
Authentication
This endpoint does not require authentication.
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. |
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
limit | integer | No | default: 20; min: 1; max: 100 | If non-zero, maximum number of incidents to return. limit should be the number between 1 to 100. |
monitorId | number | No | ID of monitor by which this incident is created | |
skip | integer | No | default: 0; min: 0 | Number of incidents to skip over (incidents are ordered in descending order by creation time) |
Responses
200 An array of monitors are returned.
Content type: application/json
Incident that is created by monitor
An array of objects with the following shape:
| Property | Type | Required | Constraints | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
creationTime | string | No | read-only (server-generated) | Timestamp of creation of this incident. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | No | read-only (server-generated) | Description of this incident | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
evaluationTimeRange | unknown | No | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
homeId | integer | No | read-only (server-generated) | Home that this monitor belongs to | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
incidentType | string | No | read-only (server-generated); one of: alert, recovery | Type of this incident | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
moduleId | string | No | read-only (server-generated) | Smart Module that this incident belongs to | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
monitorId | integer | No | read-only (server-generated) | Monitor that created this incident | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
monitorSnapshot | object | No | Snapshot of the monitor which is to be created when the incident is created | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
projectId | integer | No | read-only (server-generated) | Project that this incident belongs to | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response example
[
{
"creationTime": "2021-03-01T18:10:09Z",
"description": "RECOVERY: humidity sensor connection is back to normal",
"evaluationTimeRange": {
"begin": "2021-03-01T18:08:09Z",
"end": "2021-03-01T18:09:09Z"
},
"homeId": 100,
"incidentType": "recovery",
"moduleId": "tsdb",
"monitorId": 1347,
"monitorSnapshot": {
"condition": {
"conditionType": "timeSeriesHeartbeat",
"interval": 60,
"seriesId": "humidity"
},
"description": "",
"evaluationDelay": 60,
"incidentCustomDescriptions": {
"alert": "ALERT: check if the humidity sensor is connected",
"recovery": "RECOVERY: humidity sensor connection is back to normal"
},
"name": "humidity sensor heartbeat"
},
"projectId": 1234
},
{
"creationTime": "2021-03-01T17:02:08Z",
"description": "ALERT: check if the humidity sensor is connected",
"evaluationTimeRange": {
"begin": "2021-03-01T17:00:08Z",
"end": "2021-03-01T17:01:08Z"
},
"homeId": 100,
"incidentType": "alert",
"moduleId": "tsdb",
"monitorId": 1347,
"monitorSnapshot": {
"condition": {
"conditionType": "timeSeriesHeartbeat",
"interval": 60,
"seriesId": "humidity"
},
"description": "",
"evaluationDelay": 60,
"incidentCustomDescriptions": {
"alert": "ALERT: check if the humidity sensor is connected",
"recovery": "RECOVERY: humidity sensor connection is back to normal"
},
"name": "humidity sensor heartbeat"
},
"projectId": 1234
}
]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 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. |