getTopPrcDetails
A Graze API GET request that returns the top most likely causal alerts, based on their Probable Root Cause value, for a specified Situation.
You can select the maximum number of causal alerts to return using a limit value. If not specified, the endpoint only returns the alert with the highest root cause probability.
The entries returned are ordered with the highest root cause probability first, for the specified Situation, irrespective of whether they have been labeled causal or are unlabeled. Alerts marked as symptoms are excluded from the return.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint getTopPrcDetails
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Integer | Yes | ID of the Situation you want to retrieve the Probable Root Cause details for. |
| Integer | No | Maximum number of causal or unlabeled alerts to return. Default is 1, if not specified, returning one alert with the highest root cause probability. |
Response
Endpoint getTopPrcDetails
returns the following response:
Successful requests return an array of JSON objects containing the following:
Name | Type | Description |
---|---|---|
| Number | Root cause probability of the alert. |
| String | Description of the alert. |
| Integer | Label defining whether the alert is causal or unlabeled. Alerts marked as symptoms are excluded from the return.
|
| Integer | Alert ID. |
Examples
The following examples demonstrate typical use of endpoint getTopPrcDetails
:
Request example
Example cURL request to return the top three causal alerts with the highest root cause probability in Situation 145:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getTopPrcDetails" --data-urlencode 'sitn_id=145' --data-urlencode 'limit=3'
Response example
Example response returning the top three causal or unlabeled alerts for Situation ID 145:
{ "alerts": [ { "rc_probability":0.9933107459030244, "description":"Web Server HTTPD is DOWN", "rc_label":1, "alert_id":53 }, { "rc_probability":0.9933092393241993, "description":"Web Server HTTPD is DOWN", "rc_label":1, "alert_id":8 }, { "rc_probability":0.22480057080448923, "description":"Web Server HTTPD is DOWN", "rc_label":0, "alert_id":39 } ] }