Moogsoft Docs

getPrcLabels

A Graze API GET request that returns probable root cause (PRC) information for all alerts or specified alerts within a Situation.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint getPrcLabels takes the following request arguments:

Name

Type

Required

Description

auth_token

String

Yes

A valid auth_token returned from the authenticate request. See the authenticate endpoint for more information.

sitn_id

Integer

Yes

Situation ID.

alert_ids

Array of Numbers

No

List of alert IDs.

Response

Endpoint getPrcLabels returns the following response:

API behavior in active and historic databases

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

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of endpoint getPrcLabels:

Request example

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

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getPrcLabels?sitn_id=157&alert_ids=[1,2,3,4]"

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]
}