Moogsoft Docs

getPrcLabels

A MoogDb v2 method that returns Probable Root Cause (PRC) information for all alerts or specified alerts within a Situation.

Back to MoogDb V2 API Method Reference.

Request arguments

Method getPrcLabels takes the following request arguments:

Name

Type

Required

Description

situationId

Number

Yes

Situation ID.

alert_ids

JSON Array

No

List of alert IDs.

Response

Method getPrcLabels returns the following response:

Type

Description

Native Object

A JSON object containing the probable root cause information for the alerts in the specified Situation.

API behavior in active and historic databases

The behavior of this method depends on whether the relevant alert or Situation is open, closed and still in the active database, or closed and archived to the historic database. This method updates or returns information about the alert or Situation as follows:

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of method getPrcLabels:

Request example

Example request to return the PRC labels for alerts 1, 2, 3, and 4 in Situation 157:

var alertIds = [1,2,3,4];
var prcLabels = moogdb.getPrcLabels(157, alertIds);

Response example

Example response returning the PRC labels for alerts 1, 2, 3, and 4 in the Situation:

{ 
     "non_causal":
       [2,3],
     "unlabelled":
       [4],
     "causal":
       [1]
}