List Alerts
Query
GET /api/1.0/alerts
No parameters |
---|
Response
HTTP Status | Response |
---|---|
200 OK | Output example:
{[ { "createdDate": 1648134840000, "lastModDate": 1648134840000, "id": 242, "datasetId": 16170, "lastAlert": null, "sendToOld": null, "userId": 10077, "alertCondition": "select * where Sent > 100", "dataset": { "createdDate": null, "lastModDate": null, "id": 16170, "metadataConfig": null, "lastUpdateDate": null, "mongoId": null, "mongoConnectUri": null, "customerId": 0, "datasetName": "test2022-02-01-19-35__3", "identifier": null, "userId": 0, "refreshMeta": false, "injectStreamTime": false, "nlpEnabled": true, "nlpBotEnabled": true, "nlpConfig": null, "customer": null, "metaData": null, "direct": false }, "alertName": "alert12", "alertType": 4, "lastDataMeta": null, "accessLevel": 1, "scheduleId": 105, "schedule": { "frequencyType": "minute", "frequency": 15, "startTime": null, "cronConfig": "*/15 * * * *", "id": 105, "type": 0, "host": null, "createdDate": 1648134840000, "lastModDate": null, "sync": 0, "nextExecutionEpoch": 1648124040, "nextExecutionTime": 1648124040000 }, "realtime": true, "executionReport": null, "firedCount": 0, "createdBy": null, "deletable": true, "chartId": 26908, "lastDataMetaObj": null, "properties": { "classVersion": 2, "emailOutput": { "classVersion": 1, "from": "support@knowi.com", "sendTo": "Some@some.com", "cc": "", "bcc": "", "emailSubject": "alert10", "emailBody": "Alert triggered: %ALERT_HUMAN_READABLE_CONDITION%", "attachDataset": false, "attachResultsAfterCloud9ql": false }, "webhookOutput": { "classVersion": 1, "selectedWebhooks": [ 200 ] }, "configAttachment": false, " |
400 BAD REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X GET http://localhost:9090/api/1.0/alerts
View Alert
Query
GET /api/1.0/reports/<objectId>
Parameter | Comments |
---|---|
objectId | Alert id to view Alert |
Response
HTTP Status | Response |
---|---|
200 OK | Output example:
{ "createdDate": 1648134840000, "lastModDate": 1648134840000, "id": 242, "datasetId": 16170, "lastAlert": null, "sendToOld": null, "userId": 10077, "alertCondition": "select * where Sent > 100", "dataset": { "createdDate": null, "lastModDate": null, "id": 16170, "metadataConfig": null, "lastUpdateDate": null, "mongoId": null, "mongoConnectUri": null, "customerId": 0, "datasetName": "test2022-02-01-19-35__3", "identifier": null, "userId": 0, "refreshMeta": false, "injectStreamTime": false, "nlpEnabled": true, "nlpBotEnabled": true, "nlpConfig": null, "customer": null, "metaData": null, "direct": false }, "alertName": "alert12", "alertType": 4, "lastDataMeta": null, "accessLevel": 1, "scheduleId": 105, "schedule": { "frequencyType": "minute", "frequency": 15, "startTime": null, "cronConfig": "*/15 * * * *", "id": 105, "type": 0, "host": null, "createdDate": 1648134840000, "lastModDate": null, "sync": 0, "nextExecutionEpoch": 1648124040, "nextExecutionTime": 1648124040000 }, "realtime": true, "executionReport": null, "firedCount": 0, "createdBy": null, "deletable": true, "chartId": 26908, "lastDataMetaObj": null, "properties": { "classVersion": 2, "emailOutput": { "classVersion": 1, "from": "support@knowi.com", "sendTo": "Some@some.com", "cc": "", "bcc": "", "emailSubject": "alert10", "emailBody": "Alert triggered: %ALERT_HUMAN_READABLE_CONDITION%", "attachDataset": false, "attachResultsAfterCloud9ql": false }, "webhookOutput": { "classVersion": 1, "selectedWebhooks": [ 200 ] }, "configAttachment": false, " |
400 BAD REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X GET http://localhost:9090/api/1.0/alerts/232
Create Alert
There can be multiple different input options and is not possible to list all of them here. Please create alerts in UI and then read JSON with View or List endpoints to see alert structure and learn the options available.
Query
POST /api/1.0/alerts/
No parameters |
---|
POST JSON payload:
Sample alert creation for widget alert with alert action as Email and Webhook:
{ "alertId": 0, "chartId": 26908, "alertName": "alert12", "alertType": "4", "alertDatasetIds": [ 16170 ], "alertCondition": null, "jsonConfig": "{\"operator\":\">\",\"metric\":\"Sent\",\"threshold\":\"100\",\"classVersion\":2,\"frequencyMarker\":\"custom\",\"generateAlertIfNoDataDetected\":false,\"skipAlertIfDataOrLastUpdateSameAsBefore\":true,\"configAttachment\":false,\" Sample alert creation for dataset as trigger notification with action to Email: { "alertId": 0, "chartId": null, "alertName": "alertTrigger10", "alertType": "1", "alertDatasetIds": [ 16170 ], "alertCondition": "select * where sample > 100", "jsonConfig": "{\"classVersion\":2,\"frequencyMarker\":\"custom\",\"generateAlertIfNoDataDetected\":false,\"skipAlertIfDataOrLastUpdateSameAsBefore\":false,\"configAttachment\":false,\" |
Response
HTTP Status | Response |
---|---|
200 OK | Outputs the created Alert entity. |
400 BAD REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } Error details:
|
Example
Sample alert creation for widget alert with alert action as Email and Webhook:
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d '{"alertId":0,"chartId":26908,"alertName":"alert12","alertType":"4","alertDatasetIds":[16170],"alertCondition":null,"jsonConfig":"{\"operator\":\">\",\"metric\":\"Sent\",\"threshold\":\"100\",\"classVersion\":2,\"frequencyMarker\":\"custom\",\"generateAlertIfNoDataDetected\":false,\"skipAlertIfDataOrLastUpdateSameAsBefore\":true,\"configAttachment\":false,\"attachmentConfig\":{\"datasetId\":null,\"query\":\"\"},\"attachAlertData\":true,\"emailOutput\":{\"classVersion\":1,\"from\":\"support@knowi.com\",\"sendTo\":\"Some@some.com\",\"cc\":\"\",\"bcc\":\"\",\"emailSubject\":\"alert10\",\"emailBody\":\"Alert triggered: %ALERT_HUMAN_READABLE_CONDITION%\",\"attachDataset\":false,\"attachResultsAfterCloud9ql\":false},\"webhookOutput\":{\"classVersion\":1,\"selectedWebhooks\":[200]}}","frequency":15,"frequencyType":"minute","startTime":null,"realtime":true,"drilldownChain":"26908"}' http://localhost:9090/api/1.0/alerts
Sample alert creation for dataset as trigger notification with action to Email:
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d '{"alertId":0,"chartId":null,"alertName":"alertTrigger10","alertType":"1","alertDatasetIds":[16170],"alertCondition":"select * where sample > 100","jsonConfig":"{\"classVersion\":2,\"frequencyMarker\":\"custom\",\"generateAlertIfNoDataDetected\":false,\"skipAlertIfDataOrLastUpdateSameAsBefore\":false,\"configAttachment\":false,\"attachmentConfig\":{\"datasetId\":null,\"query\":\"\"},\"attachAlertData\":true,\"emailOutput\":{\"classVersion\":1,\"sendTo\":\"some@some.com\",\"cc\":\"\",\"bcc\":\"\",\"emailSubject\":\"Subject\",\"from\":\"\",\"emailBody\":\"Dataset %DATASET_NAME% alert condition has been been triggered by query:<br>\\n<span style=\\\"padding-left:25px;font-style: italic;\\\">%ALERT_CONDITION%</span><br>\\n<br>\\nKnowi Team<br>\\nsupport@knowi.com\",\"attachDataset\":false,\"attachResultsAfterCloud9ql\":false}}","frequency":100,"frequencyType":"minute","startTime":"03/24/2022 10:52+03:00","realtime":false,"drilldownChain":null}' http://localhost:9090/api/1.0/alerts
Edit Alert
Query
PUT /api/1.0/alerts
No parameters |
---|
PUT JSON payload:
Sample dataset trigger alert edit:. Note that id of alert to edit is within POST data as json field "alertId". { "alertId": 232, "chartId": null, "alertName": "alertTrigger13b", "alertType": "1", "alertDatasetIds": [ 16170 ], "alertCondition": "select * where sample > 100", "jsonConfig": "{\"classVersion\":2,\"frequencyMarker\":\"custom\",\"generateAlertIfNoDataDetected\":false,\"skipAlertIfDataOrLastUpdateSameAsBefore\":false,\"configAttachment\":false,\" |
Response
HTTP Status | Response |
---|---|
200 OK | Output example:
Output edited entity. |
400 BAD REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } Error details:
|
Example
Sample dataset trigger alert edit:
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d '{"alertId":232,"chartId":null,"alertName":"alertTrigger13b","alertType":"1","alertDatasetIds":[16170],"alertCondition":"select * where sample > 100","jsonConfig":"{\"classVersion\":2,\"frequencyMarker\":\"custom\",\"generateAlertIfNoDataDetected\":false,\"skipAlertIfDataOrLastUpdateSameAsBefore\":false,\"configAttachment\":false,\"attachmentConfig\":{\"datasetId\":null,\"query\":\"\"},\"attachAlertData\":true,\"emailOutput\":{\"classVersion\":1,\"sendTo\":\"some@some.com\",\"cc\":\"\",\"bcc\":\"\",\"emailSubject\":\"Subject\",\"from\":\"\",\"emailBody\":\"Dataset %DATASET_NAME% alert condition has been been triggered by query:<br>\\n<span style=\\\"padding-left:25px;font-style: italic;\\\">%ALERT_CONDITION%</span><br>\\n<br>\\nKnowi Team<br>\\nsupport@knowi.com\",\"attachDataset\":false,\"attachResultsAfterCloud9ql\":false}}","frequency":100,"frequencyType":"minute","startTime":"03/24/2022 10:52+03:00","realtime":false,"drilldownChain":null}' http://localhost:9090/api/1.0/alerts
Share to Users and Groups
Query
PUT /alerts/lt;objectId>/share
Parameter | Comments |
---|---|
objectId | Alert id to share |
PUT JSON payload:
Parameter | Comments |
---|---|
shareProperties | Share properties json array. Available fields:
|
Response
HTTP Status | Response |
---|---|
200 OK | No response body |
400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } |
415 UNSUPPORTED_MEDIA_TYPE | Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method. |
Example
curl -i -H "Authorization: Bearer HEREISYOURBEARER" -H "Content-Type: application/json" -X PUT -d "{\"shareProperties\" : [ { \"type\" : \"Users\", \"accesslevel\" : 1, \"name\" : \"a@a.com\", \"sso_user\" : true } ] }" http://localhost:9090/api/1.0/alerts/232/share
Delete Alert
Query
DELETE /alerts/<objectId>
Parameter | Comments |
---|---|
objectId | Alert id to delete |
Response
HTTP Status | Response |
---|---|
200 OK | No response body |
400 BAD REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X DELETE http://localhost:9090/api/1.0/alerts/232
Test Run Alert
Run the alert (provided as input json, not via ID) as a test with executing alert actions. Useful to check alert before creating (saving) it.
Query
POST /api/1.0/alerts/test
No parameters |
---|
POST JSON payload:
Sample alert creation for widget alert with alert action as Email and Webhook:
{ "alertId": 240, "chartId": 26908, "alertName": "alert12", "alertType": "4", "alertDatasetIds": [ 16170 ], "alertCondition": null, "jsonConfig": "{\"operator\":\">\",\"metric\":\"Sent\",\"threshold\":\"100\",\"classVersion\":2,\"frequencyMarker\":\"custom\",\"alertIfNoData\":false,\"skipSameAlert\":true,\"configAttachment\":false,\" |
Response
HTTP Status | Response |
---|---|
200 OK | Output contains JSON with details of alert test, including alert actions status. Output example: {"executionDate":1648110509606,"executionStatus":"ALERT","duration":723,"details":[{"ok":true,"channel":"EMAIL","error":"Sent"},{"ok":false,"channel":"WEBHOOK","error":"Unable to execute webhook url http://url1.com due to unexpected error, please contact the administrator."}]}In this example output the email sent fine, the webhook failed. |
400 BAD REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } Error details:
|
Example
Sample: run alert and send to email and webhook.
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d '{"alertId":240,"chartId":26908,"alertName":"alert12","alertType":"4","alertDatasetIds":[16170],"alertCondition":null,"jsonConfig":"{\"operator\":\">\",\"metric\":\"Sent\",\"threshold\":\"100\",\"classVersion\":2,\"frequencyMarker\":\"custom\",\"generateAlertIfNoDataDetected\":false,\"skipAlertIfDataOrLastUpdateSameAsBefore\":true,\"configAttachment\":false,\"attachmentConfig\":{\"datasetId\":null,\"query\":\"\"},\"attachAlertData\":true,\"emailOutput\":{\"classVersion\":1,\"from\":\"support@knowi.com\",\"sendTo\":\"Some@some.com\",\"cc\":\"\",\"bcc\":\"\",\"emailSubject\":\"alert10\",\"emailBody\":\"Alert triggered: %ALERT_HUMAN_READABLE_CONDITION%\",\"attachDataset\":false,\"attachResultsAfterCloud9ql\":false},\"webhookOutput\":{\"classVersion\":1,\"selectedWebhooks\":[200]}}","frequency":15,"frequencyType":"minute","startTime":null,"realtime":true,"drilldownChain":"26908"}' http://localhost:9090/api/1.0/alerts/test
Preview Widget Alert
Applicable only for anomaly detection widget alert type.
Output the temporary widget bean with properties and with preview data for alert.
Query
POST /api/1.0/alerts/preview/widget
No parameters |
---|
POST JSON payload:
Sample input:
{ "alertId": 234, "chartId": 26908, "alertName": "alert10", "alertType": "5", "alertDatasetIds": [ 16170 ], "alertCondition": null, "jsonConfig": "{\"operator\":\">\",\"metric\":\"Sent\",\"dateTime\":\"Week\",\"threshold\":\"100\",\"classVersion\":2,\"frequencyMarker\":\"custom\",\"generateAlertIfNoDataDetected\":false,\"skipAlertIfDataOrLastUpdateSameAsBefore\":true,\"configAttachment\":false,\" |
Response
HTTP Status | Response |
---|---|
200 OK | Output example:
{ "createdDate": null, "lastModDate": null, "id": -1, "name": "Polynomial Regression Model", "userId": 0, "customerId": 0, "datasetId": 0, "type": 1, "description": null, "urlString": null, "access": 0, "refreshChartMillis": -1, "jsonConfig": null, "shareUrl": null, "accessLevel": -1, "dashboardAccessLevel": -1, "categoryAccessLevel": -1, "autoShared": false, "urlShareWhitelistDomain": null, "filterSettings": null, "chartType": null, "alertCount": 0, "queryId": -1, "queryStr": null, "adhocQuery": null, "categories": null, "userExternalAuthId": 0, "userSso": false, "drilldown": false, "dataset": null, "position": { "chartId": 0, "width": 500, "height": 400, "originalScreenWidth": 0, "originalScreenHeight": 0, "col": 0, "row": 0, "ypos": 0, "xpos": 0, "id": 0, "size_x": 0, "size_y": 0 }, "associations": null, "queryModified": false, "updateFilters": false, "dataFields": [ "id", "Sent", "message_type", "Customer", "Week", "Date", "Opened", "Spam", "Bounced", "Delivered", "Clicks", "Conversions", "Campaign_name" ], "dataFieldsTypes": { "id": "java.lang.Integer", "Sent": "java.lang.Integer", "message_type": "java.lang.String", "Customer": "java.lang.String", "Week": "java.util.Date", "Date": "java.util.Date", "Opened": "java.lang.Integer", "Spam": "java.lang.Integer", "Bounced": "java.lang.Integer", "Delivered": "java.lang.Integer", "Clicks": "java.lang.Integer", "Conversions": "java.lang.Integer", "Campaign_name": "java.lang.String" }, "transientChartFilters": null, "typeModified": false, "lastSyncDate": null, "viewOnly": false, "truncated": null, "processedName": "Polynomial Regression Model", "processedDescription": null, "processedFootNote": null, "error": null, "widgetConfig": null, "notDefaultFilter": false, "chartProperties": { "chart.type": "anomaly", "chart.anomaly.dimension": "", "chart.anomaly.threshold": "100", "chart.anomaly.algorithm": "Polynomial Regression Model", "chart.xAxis.column": "Week", "chart.series.data": "Sent" }, "xAxis": null, "yAxis": null, "dataJSONArr": [ { "name": "Sent", "id": "Sent", "data": [ { "name": 1423382400000, "x": 1423382400000, "y": 1682348 }, { "name": 1423987200000, "x": 1423987200000, "y": 33593964 }, { "name": 1424592000000, "x": 1424592000000, "y": 2753792 } ], "type": "line", "zIndex": "0", "zoneAxis": "x", "color": "#E61BCB", "chart.anomaly.dimension": null }, { "name": "Boundaries", "id": "Boundaries", "data": [ { "name": 1423382400000, "x": 1423382400000, "low": 0, "high": 3364696 }, { "name": 1423987200000, "x": 1423987200000, "low": 0, "high": 67187928 }, { "name": 1424592000000, "x": 1424592000000, "low": 0, "high": 5507584 } ], "type": "arearange", "zIndex": "1", "lineWidth": "0", "linkedTo": "previous", "fillOpacity": "0.12", "color": "#FF8682", "chart.anomaly.dimension": null } ], "chartMarkers": null, "dataGroup": null, "gridBean": null, "xaxisJSONArr": null, "yaxisJSONArr": null, "filters": [], "widgetAccessLevel": -1, "chartPropertiesNullOrEmpty": false, "filterFieldDataTypes": {}, "processedFilters": [], "live": false, "strictFilters": null, "dataDisplayTypes": {}, "dbFields": [ "id", "Sent", "message_type", "Customer", "Week", "Date", "Opened", "Spam", "Bounced", "Delivered", "Clicks", "Conversions", "Campaign_name" ], "ignoreVals": [ "id", "Sent", "message_type", "Customer", "Week", "Date", "Opened", "Spam", "Bounced", "Delivered", "Clicks", "Conversions", "Campaign_name" ], "widgetTypeStr": "chart", "filterFieldDataTypesIncludingNested": {} } |
400 BAD REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d '{"alertId":234,"chartId":26908,"alertName":"alert10","alertType":"5","alertDatasetIds":[16170],"alertCondition":null,"jsonConfig":"{\"operator\":\">\",\"metric\":\"Sent\",\"dateTime\":\"Week\",\"threshold\":\"100\",\"classVersion\":2,\"frequencyMarker\":\"custom\",\"generateAlertIfNoDataDetected\":false,\"skipAlertIfDataOrLastUpdateSameAsBefore\":true,\"configAttachment\":false,\"attachmentConfig\":{\"datasetId\":null,\"query\":\"\"},\"attachAlertData\":true,\"emailOutput\":{\"classVersion\":1,\"from\":\"support@knowi.com\",\"sendTo\":\"Test8@some.com\",\"cc\":\"\",\"bcc\":\"\",\"emailSubject\":\"alert10\",\"emailBody\":\"Alert triggered: %ALERT_HUMAN_READABLE_CONDITION%\",\"attachDataset\":false,\"attachResultsAfterCloud9ql\":false}}","frequency":15,"frequencyType":"minute","startTime":null,"realtime":true,"drilldownChain":"26908"}' http://localhost:9090/api/1.0/alerts/preview/widget
Preview Alert Data
Query
POST /api/1.0/alerts/lt;objectId>/preview/data
Parameter | Comments |
---|---|
objectId | Alert id to preview the data |
POST JSON payload:
Contains additional parameters (the c9QL and datasetId). Sample input: {"c9QL":"select * where Sent > 100","datasetId":16170} |
Response
HTTP Status | Response |
---|---|
200 OK | Output example:
{ "jsonRows": [ { "Sent": 255621, "message_type": "Transactional", "Customer": "Facebook", "Week": "02/27/2015 00:00:00 PST", "Date": "01/28/2015 16:29:00 PST", "Opened": 65935, "Spam": 602, "Bounced": 15242, "Delivered": 237103, "Clicks": 16073, "Conversions": 3121, "Campaign_name": "Trial", "id ": 81754, "id": 1 }, { "Sent": 235279, "message_type": "Transactional", "Customer": "Target", "Week": "02/27/2015 00:00:00 PST", "Date": "02/28/2015 16:29:00 PST", "Opened": 51505, "Spam": 564, "Bounced": 12779, "Delivered": 210054, "Clicks": 13115, "Conversions": 2569, "Campaign_name": "Newsletter", "id ": 81755, "id": 2 } ] } |
400 BAD REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d '{"c9QL":"select * where Sent > 100","datasetId":16170}' http://localhost:9090/api/1.0/alerts/242/preview/data
Status of Alert
Query
GET /api/1.0/alerts/<objectId>/status
Parameter | Comments |
---|---|
objectId | Alert id to view status |
Response
HTTP Status | Response |
---|---|
200 OK | Output example:
[ { "executionDate": 1648114321000, "executionStatus": "ALERT", "duration": 55, "details": [ { "ok": true, "channel": "EMAIL", "error": "Sent" } ] }, { "executionDate": 1648120329000, "executionStatus": "ALERT", "duration": 32, "details": [ { "ok": true, "channel": "EMAIL", "error": "Sent" } ] } ] |
400 BAD REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> } Common error details:
|
403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> } Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" http://localhost:9090/api/1.0/alerts/239/status