This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Alert Management
wagmarcel edited this page Jan 10, 2018
·
1 revision
The Alert API is a REST Interface for handling alerts.
Get a list of all alerts for the specified account.
Param | Type | Description | Value |
---|---|---|---|
Authorization | HTTP Header | Access Token | Authorization: Bearer eyJ0eX... |
accountId | URL Slug | The ID of an Account | 534da46c820cb9f74a0d3de6 |
Request
GET /accounts/{accountId}/alerts
Response 200 OK (application/json)
[
{
"accountId": "0d66c8b6-9f4d-4551-a9c8-d356c2dd033d",
"alertId": "75",
"deviceId": "00-00-00-00-a8-9c",
"ruleId": 6832,
"ruleName": "rule 2 - basic condition new",
"priority": "Low",
"triggered": 1402580459000,
"created": 1411130946286,
"naturalLangAlert": "temperature > 17.2",
"conditions": [
{
"sequence": 1,
"condition": "temperature > 17.2"
}
],
"status": "New",
"updated": 1411130946286,
"_id": "541c2642b3700bcbe9c76fc5"
}
]
Get specific alert details connected with the account.
Param | Type | Description | Value |
---|---|---|---|
Authorization | HTTP Header | Access Token | Authorization: Bearer eyJ0eX... |
accountId | URL Slug | The ID of an Account | 0d66c8b6-9f4d-4551-a9c8-d356c2dd033d |
alertId | URL Slug | The ID of an Alert | 75 |
Request
GET /accounts/{accountId}/alerts/{alertId}
Response 200 OK
{
"accountId": "0d66c8b6-9f4d-4551-a9c8-d356c2dd033d",
"alertId": "75",
"deviceId": "00-00-00-00-a8-9c",
"ruleId": 6832,
"ruleName": "rule 2 - basic condition new",
"priority": "Low",
"triggered": 1402580459000,
"created": 1411130946286,
"naturalLangAlert": "temperature > 17.2",
"conditions": [
{
"sequence": 1,
"condition": "temperature > 17.2",
"components": [
{
"componentId": "e5f09130-c70e-4082-9801-49833c853493",
"dataType": "Number",
"componentName": "GA9c-3-Temp.Sensor",
"valuePoints": [
{
"timestamp": 1402580459000,
"value": "21"
}
]
}
]
}
],
"status": "New",
"updated": 1411130946286,
"_id": "541c2642b3700bcbe9c76fc5"
}
Change alert status to - "Closed". Alert won't be active any more.
Param | Type | Description | Value |
---|---|---|---|
Authorization | HTTP Header | Access Token | Authorization: Bearer eyJ0eX... |
accountId | URL Slug | The ID of an Account | 0d66c8b6-9f4d-4551-a9c8-d356c2dd033d |
alertId | URL Slug | The ID of an Alert | 75 |
Request
PUT /accounts/{accountId}/alerts/{alertId}/reset
Response 200 OK
Change status of the Alert. Status should have one of the following values: ['New', 'Open', 'Closed']
Param | Type | Description | Value |
---|---|---|---|
Authorization | HTTP Header | Access Token | Authorization: Bearer eyJ0eX... |
accountId | URL Slug | The ID of an Account | 0d66c8b6-9f4d-4551-a9c8-d356c2dd033d |
alertId | URL Slug | The ID of an Alert | 75 |
statusName | URL Slug | The Name of a new alert status | "Closed" |
Request
PUT /accounts/{accountId}/alerts/{alertId}/status/{statusName}
Response 200 OK
Add list of comments to the alert.
Param | Type | Description | Value |
---|---|---|---|
Authorization | HTTP Header | Access Token | Authorization: Bearer eyJ0eX... |
Content-Type | HTTP Header | Type of body content | application/json |
accountId | URL Slug | The ID of an Account | 0d66c8b6-9f4d-4551-a9c8-d356c2dd033d |
alertId | URL Slug | The ID of an Alert | 75 |
Request
POST /accounts/{accountId}/alerts/{alertId}/comments
[
{
"user": "[email protected]",
"timestamp": 123233231221,
"text": "comment"
}
]
Response 200 OK
- Home
-
Overview
- Rule Engine
- Service Hub
- Dashboard
- Data Backend
- Integration of Analytics
- IoT Agent
- Using Docker
- Authentication and Authorization
- Rest API
- Configuration
- Build