Get alert history

get

/serviceapi/eventServices/alerts/{alertId}/history

Retrieves list of messages associated with the alert along with corresponding timestamps.

Request

Supported Media Types
Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

query was successful
Body ()
Root Schema : ItemListHistoryElements
Type: object

It is describing the list of history elements returned in response to an alert history request.

Show Source
Nested Schema : items
Type: array
The items
Show Source
Nested Schema : HistoryElement
Type: object

It provides a message associated with the alert and its time.

Show Source
  • The message
    Example: Sent email to demo_user@xyz_company.com
  • The message time in UTC
    Example: 2020-09-02T19:41:53.281Z

400 Response

The alert id is invalid
Body ()
Root Schema : InvalidRequest
Type: object

When invalid alert API request is received, alert system returns this response.

Show Source

500 Response

encountered unhandled exception
Body ()
Root Schema : UnhandledException
Type: object

When alert system runs into unhandled exception, it returns this response.

Show Source
Back to Top

Examples

Get alert history

curl -u ${OMC_USERNAME}:${PASSWORD} -X GET "https://serverurl/serviceapi/eventServices/alerts/62965132339213727047162539738389170623/history"

The response might look like the following:

    {
     "items": [
      {
       "time": "2020-07-20T19:01:59.248Z",
       "message": "Alert was automatically cleared: There was no update for the past seven days. Notifications will be skipped. Associated tickets, if any, will be updated."  
      },
      {
       "time": "2020-07-13T19:00:22.532Z",
       "message": "Sent email to demo_user@xyz_company.com"
      },
      {
       "time": "2020-07-13T19:00:11.133Z",
       "message": "Critical Alert: CPU Utilization for demo_host.some_domain.com is 95.75 %; it is greater than expected value of 95 % for 10 minutes"
      }
     ],
     "hasMore": false,
     "count": 3
    }
Back to Top