Skip to main content

getSituationDetails

A Graze API GET request that returns the details of a specified Situation.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint getSituationDetails 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.

Response

Endpoint getSituationDetails returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

category

String

Category of the alert.

created_at

Number

Time when Moogsoft Enterprise created the Situation. This is a Unix epoch timestamp in seconds.

custom_info

Object

Object containing the custom info for the Situation; null if there is no custom info for the Situation.

description

String

Description of the Situation.

first_event_time

Number

The "first_event_time" of the earliest alert in the Situation, calculated each time an alert is added or removed from the Situation.

internal_priority

Number

Internal priority of the Situation.

last_event_time

Number

The "first_event_time" of the latest alert in the Situation, calculated each time an alert is added or removed from the Situation.

last_state_change

Number

Time when the last state change occurred. This is a Unix epoch timestamp in seconds.

moderator_id

String

Owner of the Situation.

sitn_id

Number

Situation ID.

status

Number

Status of the Situation.

story_id

Number

superseded_by

String

The ID of the Situation that supersedes this Situation, null if the Situation is not superseded.

total_alerts

Number

Total number of alerts in the Situation.

total_unique_alerts

Number

Total number of alerts that are unique to the Situation.

primary_team_id

Number

ID of the primary team assigned to the Situation. This is not returned if there is no primary team.

Examples

The following examples demonstrate typical use of endpoint getSituationDetails:

Request example

Example cURL request to the details of Situation ID 173:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSituationDetails" \
--data-urlencode "sitn_id=173"

Response example

Example response returning the details of Situation ID 173:

{
    "category":"Detected",
    "created_at":1415814620,
    "custom_info":null,
    "description":"Sigaliser situation",
    "first_event_time":1415814600,
    "internal_priority":0,
    "last_event_time":1415814619,
    "last_state_change":1415868947,
    "moderator_id":2,
    "sitn_id":173,
    "status":1,
    "story_id":3,
    "superseded_by":null,
    "total_alerts":1403,
    "total_unique_alerts":1403,
    "primary_team_id":2
}