Alert APIs
Get All Alert Definitions (GET)
Get all AlertDefinitions
Route
|
URI |
/api/v1/alert |
|
Method |
GET |
|
Result |
JSON – AlertDefinition[] |
Parameters
None
Example
GET http://localhost/api/v1/alert
Get Alert By Id (GET)
See <see cref="IOpenAlertService.GetAlertById"/>.
Route
|
URI |
/api/v1/alert/byalertid |
|
Method |
GET |
|
Result |
JSON – AlertDefinition |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
alertId |
Guid |
No |
|
Example
GET http://localhost/api/v1/alert/byalertid
Get Alerts By Resource Key (GET)
See <see cref="IOpenAlertService.GetAlertById"/>.
Route
|
URI |
/api/v1/alert/byresourcekey |
|
Method |
GET |
|
Result |
JSON – AlertDefinition[] |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
resourceKey |
ResourceKey |
No |
|
Example
GET http://localhost/api/v1/alert/byresourcekey
Check Alert Sensor (POST)
See <see cref="IOpenAlertService.GetAlertSensors"/>.
Route
|
URI |
/api/v1/alert/checksensor |
|
Method |
POST |
|
Result |
JSON – bool |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
resource |
object |
No |
|
Example
POST http://localhost/api/v1/alert/checksensor
Create Update Alert (POST)
Create an alert or update existing alert
Route
|
URI |
/api/v1/alert/createupdate |
|
Method |
POST |
|
Result |
JSON – ChangeResult |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
createUpdateAlertModel |
object |
No |
|
Response Structure Returns ChangeResult object containing:
-
Success: bool value
-
Data: object value
-
ResponseId: Guid? value
-
ErrorDetails: ExternalInterfaceException value
Example
POST http://localhost/api/v1/alert/createupdate
Example Response
{ "Success": true, "Data": {}, "ResponseId": "123e4567-e89b-12d3-a456-426614174000", "ErrorDetails": {} }
Delete Alert Definition (POST)
See <see cref="IOpenAlertService.DeleteAlertDefinition"/>.
Route
|
URI |
/api/v1/alert/remove |
|
Method |
POST |
|
Result |
JSON – ChangeResult |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
deleteAlertModel |
object |
No |
|
Response Structure Returns ChangeResult object containing:
-
Success: bool value
-
Data: object value
-
ResponseId: Guid? value
-
ErrorDetails: ExternalInterfaceException value
Example
POST http://localhost/api/v1/alert/remove
Example Response
{ "Success": true, "Data": {}, "ResponseId": "123e4567-e89b-12d3-a456-426614174000", "ErrorDetails": {} }
Get Alert Sensors (POST)
See <see cref="IOpenAlertService.GetAlertSensors"/>.
Route
|
URI |
/api/v1/alert/sensors |
|
Method |
POST |
|
Result |
JSON – AlertEventType[] |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
resource |
object |
No |
|
Example
POST http://localhost/api/v1/alert/sensors
Update Alert Definition (POST)
See <see cref="IOpenAlertService.UpdateAlertDefinition"/>.
Route
|
URI |
/api/v1/alert/update |
|
Method |
POST |
|
Result |
JSON – ChangeResult |
Parameters
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
UpdateAlertModel |
object |
No |
|
Response Structure Returns ChangeResult object containing:
-
Success: bool value
-
Data: object value
-
ResponseId: Guid? value
-
ErrorDetails: ExternalInterfaceException value
Example
POST http://localhost/api/v1/alert/update
Example Response
{ "Success": true, "Data": {}, "ResponseId": "123e4567-e89b-12d3-a456-426614174000", "ErrorDetails": {} }