Moogsoft Docs

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. See the authenticate endpoint for more information.

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 AIOps 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

Time when Moogsoft AIOps received the first event. This is a Unix epoch timestamp in seconds.

internal_priority

Number

Internal priority of the Situation.

last_event_time

Number

Time when Moogsoft AIOps received the latest event. This is a Unix epoch timestamp in seconds.

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.

API update behavior

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