A Graze API GET request that returns the details of a specified Situation.
Back to Graze API EndPoint Reference.
Endpoint getSituationDetails
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | Situation ID. |
Endpoint getSituationDetails
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | Category of the alert. |
| Number | Time when Moogsoft Enterprise created the Situation. This is a Unix epoch timestamp in seconds. |
| Object | Object containing the custom info for the Situation; |
| String | Description of the Situation. |
| Number | The "first_event_time" of the earliest alert in the Situation, calculated each time an alert is added or removed from the Situation. |
| Number | Internal priority of the Situation. |
| Number | The "first_event_time" of the latest alert in the Situation, calculated each time an alert is added or removed from the Situation. |
| Number | Time when the last state change occurred. This is a Unix epoch timestamp in seconds. |
| String | Owner of the Situation. |
| Number | Situation ID. |
| Number | Status of the Situation. |
| Number | |
| String | The ID of the Situation that supersedes this Situation, |
| Number | Total number of alerts in the Situation. |
| Number | Total number of alerts that are unique to the Situation. |
| Number | ID of the primary team assigned to the Situation. This is not returned if there is no primary team. |
The following examples demonstrate typical use of endpoint getSituationDetails
:
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"
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
}