Skip to main content

setPrcLabels

A Graze API POST request that sets the probable root cause (PRC) labels for specified alerts within a Situation. You must specify at least one PRC level and an alert ID for that level.

You can mark alerts as causal, non-causal or unlabeled within a Situation. An alert can have different PRC levels within different Situations.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint setPrcLabels takes the following request arguments:

Name

Type

Required

Description

auth_token

String

Yes

A valid auth_token returned from the authenticate request. Alternatively, basic authenticate headers can be used in place of this parameter. See the authenticate endpoint for more information and usage examples.

sitn_id

Number

Yes

Situation ID.

causal

Array of Numbers

No, if you specify non_causal or unlabelled.

A list of alert IDs that you want to be marked as causal.

non_causal

Array of Numbers

No, if you specify causal or unlabelled.

A list of alert IDs that you want to be marked as non-causal.

unlabelled

Array of Numbers

No, if you specify causal or non_causal.

A list of alert IDs that you want to be marked as unlabeled.

Response

Endpoint setPrcLabels returns the following response:

API update behavior

The behavior of this endpoint 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 endpoint updates the alert or Situation as follows:

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of endpoint setPrcLabels:

Request example

Example cURL request to set alert ID 1 as causal, alert IDs 2 and 3 as non-causal, and alert 4 as unlabeled:

curl -POST -u graze:graze -k -v "https://localhost/graze/v1/setPrcLabels" --data-urlencode "sitn_id=1" --data-urlencode "causal=[1]" --data-urlencode "non_causal=[2,3]" --data-urlencode "unlabelled=[4]"

Response example