Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Alerts Resource

dongpujin edited this page Aug 27, 2018 · 10 revisions

User Guide | Web Service API


Web API Alert Endpoints

Provides methods to retrieve the audit trail history for an Argus object. Audit trails provide a history of changes and other events for an object.

Endpoint Method Description
/alerts GET Returns an alert
/alerts POST Creates an alert
/alerts/{alertId} GET Returns an alerts by its ID
/alerts/{alertId} PUT Updates an alert having the given ID
/alerts/{alertId} DELETE Deletes the alert, its triggers, and notifications
/alerts/{alertId}/notifications GET Returns all notifications for the given alert ID
/alerts/{alertId}/notifications POST Creates new notifications for the given alert ID
/alerts/{alertId}/notifications DELETE Deletes all notifications for the given alert ID
/alerts/{alertId}/notifications/{notificationId} GET Returns a notifications by its ID
/alerts/{alertId}/notifications/{notificationId} PUT Updates a notification having the given notification ID if associated with the given alert ID
/alerts/{alertId}/notifications/{notificationId} DELETE Deletes a notification having the given ID if it's associated with the given alert ID
/alerts/{alertId}/notifications/{notificationId}/triggers GET Returns all the triggers for the given notification ID
/alerts/{alertId}/notifications/{notificationId}/triggers DELETE Disassociates all triggers from the notification having the given notification ID
/alerts/{alertId}/notifications/{notificationID}/triggers/{triggerId} GET Returns a trigger by its ID only if it's associated with the given notification ID.
/alerts/{alertId}/notifications/{notificationId}/triggers/{triggerId} POST Associates the trigger having the given ID to the given notification ID
/alerts/{alertId}/notifications/{notificationId}/triggers/{triggerId} DELETE Disassociates a trigger having the given ID from the given notification ID
/alerts/{alertId}/triggers GET Returns all triggers for the given alert ID
/alerts/{alertId}/triggers POST Creates new triggers for the given alert ID
/alerts/{alertId}/triggers DELETE Deletes all triggers for the given alert ID
/alerts/{alertId}/triggers/{triggerId} GET Returns a trigger by its ID.
/alerts/{alertId}/triggers/{triggerId} PUT Updates a trigger having the given ID if it's associated with the given alert ID
/alerts/{alertId}/triggers/{triggerId} DELETE Deletes a trigger having the given ID and removes any associations with the alert or notifications
/meta/user GET Returns a page of alerts belong to the current user with given offset and page size.
/meta/user/count GET Count total number of alerts belong to the current user.
/meta/shared GET Returns a page of shared alerts the current user has access to with given offset and page size.
/meta/shared/count GET Count total number of shared alerts the current user has access to.
/meta/privileged GET Returns a page of privileged (non-shared) alerts the current user has access to with given offset and page size.
/meta/privileged/count GET Count total number of privileged (non-shared) alerts the current user has access to.

Return an Alert

Get Argus alert information on all alerts.

Resource URL
/alerts

Available Version
2.0

HTTP Methods
GET

Query Parameters

Name Type Description
alertname string Alert name
ownername string Owner of the alert

** Example Response Body**

[{
    "id": 100868,
    "createdById": 1,
    "createdDate": 1422483200579,
    "modifiedById": 1,
    "modifiedDate": 1444405128804,
    "name": "P95TRUST Alert",
    "expression": "-24h:myhost.dc0:p95trust:max",
    "cronEntry": "*/15 * * * *",
    "enabled": true,
    "shared": true
      
}]

Create an Alert

Create Argus alerts.

Resource URL
/alerts

Available Version
2.0

HTTP Methods
POST

Request Parameters

Name Type Description
body alert

Get Specific Alerts

Get Argus alerts by specific ID.

Resource URL
/alerts/{alertId}

Available Version
2.0

HTTP Methods
GET

Path Parameter

Name Type Description
alertId biginteger ID of the alert object

Update Specific Alerts

Update Argus alerts by specific ID.

Resource URL
/alerts/{alertId}

Available Version
2.0

HTTP Methods
PUT

Path Parameter

Name Type Description
alertId biginteger ID of the alert object

Response Body

Name Type Description
body alert

Delete Alerts

Delete Argus alerts by specific ID. Associated triggers are not deleted from the alert.

Resource URL
/alerts/{alertId}

Available Version
2.0

HTTP Methods
DELETE

Path Parameter

Name Type Description
alertId biginteger

Get Notifications for Specific Alerts

Get Argus notifications for alerts by specific ID. Associated triggers are not deleted from the alert.

Resource URL
/alerts/{alertId}/notifications

Available Version
2.0

HTTP Methods
GET

Path Parameter

Name Type Description
alertId biginteger

Create Notifications for Specific Alerts

Create notifications for an alert by the unique ID.

Resource URL
/alerts/{alertId}/notifications

Available Version
2.0

HTTP Methods
POST

Path Parameter

Name Type Description
alertId biginteger

Response Body

Name Type Description
body notification

Delete Notifications for Alerts

Delete all notifications for a specific alert Id. Associated triggers are not deleted from the alert.

Resource URL
/alerts/{alertId}/notifications

Available Version
2.0

HTTP Methods
DELETE

Path Parameter

Name Type Description
alertId biginteger

Get Specific Notifications

Get notifications by unique ID.

Resource URL
/alerts/{alertId}/notifications/{notificationId}

Available Version
2.0

HTTP Methods
GET

Path Parameter

Name Type Description
alertId biginteger
notificationId biginteger

Update Specific Notifications

Update a notification having a given notification ID if associated with the given alert ID.

Resource URL
/alerts/{alertId}/notifications/{notificationId}

Available Version
2.0

HTTP Method
PUT

Path Parameter

Name Type Description
alertId biginteger
notificationId biginteger

Response Body

Name Type Description
body notification

Delete Specific Notifications

Delete a notification with a specific ID if associated with the given alert ID.

Resource URL
/alerts/{alertId}/notifications/{notificationId}

Available Version
2.0

HTTP Method
DELETE

Path Parameter

Name Type Description
alertId biginteger
notificationId biginteger

Get Triggers for Specific Notifications

Get all the triggers for the given notification ID.

Resource URL
/alerts/{alertId}/notifications/{notificationId}/triggers

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
alertId biginteger
notificationId biginteger

Delete Triggers From Specific Notifications

Disassociate all triggers from the notification having the given notification ID.

Resource URL
/alerts/{alertId}/notifications/{notificationId}/triggers

Available Version
2.0

HTTP Method
DELETE

Path Parameter

Name Type Description
alertId biginteger
notificationId biginteger

Get Specific Triggers for Specific Notifications

Get a trigger by its ID only if it's associated with the given notification ID.

Resource URL
/alerts/{alertId}/notifications/{notificationId}/triggers/{triggerId}

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
alertId biginteger
notificationId biginteger
triggerId biginteger

Associates

Get a trigger by its ID only if it's associated with the given notification ID.

Resource URL
/alerts/{alertId}/notifications/{notificationId}/triggers/{triggerId}

Available Version
2.0

HTTP Method
POST

Path Parameter

Name Type Description
alertId biginteger
notificationId biginteger
triggerId biginteger

Disassociate a Trigger From a Notification

Disassociate a trigger having the given ID from the given notification ID. The trigger is not deleted from the alert.

Resource URL
/alerts/{alertId}/notifications/{notificationId}/triggers/{triggerId}

Available Version
2.0

HTTP Method
DELETE

Path Parameter

Name Type Description
alertId biginteger
notificationId biginteger
triggerId biginteger

Get Triggers for Specific Alerts

Get a trigger by its unique ID.

Resource URL
/alerts/{alertId}/triggers

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
alertId biginteger

Create a New Trigger

Create a new trigger having the given ID to the given notification ID.

Resource URL
/alerts/{alertId}/triggers

Available Version
2.0

HTTP Method
POST

Path Parameter

Name Type Description
alertId biginteger
body trigger

Body Response

Delete Triggers

Delete all triggers for the given alert ID. All associations to alert notification are also removed.

Resource URL
/alerts/{alertId}/triggers

Available Version
2.0

HTTP Method
DELETE

Path Parameter

Name Type Description
alertId biginteger

Get Specific Triggers

Get triggers by its unique ID.

Resource URL
/alerts/{alertId}/triggers/{triggerId}

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
alertId biginteger
triggerId biginteger

Update Specific Triggers

Update a trigger having the given ID if it's associated with the given alert ID.

Resource URL
/alerts/{alertId}/triggers/{triggerId}

Available Version
2.0

HTTP Method
PUT

Path Parameter

Name Type Description
alertId biginteger
triggerId biginteger
body trigger

Response Body

Return a page of user alerts

Return a page of alerts belong to the current user with given offset and page size.

Resource URL
/meta/user

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
pagesize biginteger The size of a page.
pagenumber biginteger The offset of a page.
searchtext string (Optional) The search text (case insensitive) to filter the search results on alert name and owner name.

Count user alerts

Count the total number of alerts belong to the current user.

Resource URL
/meta/user/count

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
searchtext string (Optional) The search text (case insensitive) to filter the search results on alert name and owner name.

Return a page of shared alerts

Return a page of shared alerts the current user has access to with given offset and page size.

Resource URL
/meta/shared

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
pagesize biginteger The size of a page.
pagenumber biginteger The offset of a page.
searchtext string (Optional) The search text (case insensitive) to filter the search results on alert name and owner name.

Count shared alerts

Count the total number of shared alerts the current user has access to.

Resource URL
/meta/shared/count

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
searchtext string (Optional) The search text (case insensitive) to filter the search results on alert name and owner name.

Return a page of privileged alerts

Return a page of privileged (non-shared) alerts the current user has access to with given offset and page size.

Resource URL
/meta/privileged

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
pagesize biginteger The size of a page.
pagenumber biginteger The offset of a page.
searchtext string (Optional) The search text (case insensitive) to filter the search results on alert name and owner name.

Count privileged alerts

Count the total number of privileged alerts the current user has access to.

Resource URL
/meta/privileged/count

Available Version
2.0

HTTP Method
GET

Path Parameter

Name Type Description
searchtext string (Optional) The search text (case insensitive) to filter the search results on alert name and owner name.
Clone this wiki locally