A Graze API GET request that returns the hosts for a specified Situation, either for all the alerts in the Situation or just for the unique alerts.
Back to Graze API EndPoint Reference.
Endpoint getSituationHosts
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | Situation ID. |
| Boolean | No |
Endpoint getSituationHosts
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| JSON object | An array of all hosts that sent alerts contained in the specified Situation. |
The following examples demonstrate typical use of endpoint getSituationHosts
:
Example cURL request to return all the hosts that sent alerts to Situation ID 447:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSituationHosts" \
--data-urlencode "sitn_id=447"
Example response returning all the hosts that sent alerts to Situation ID 447:
{
hosts:
[
"xldn1204pap",
"xldn1215pap",
"xldn1220pap",
"vxldn1230pap",
"xldn1241pap",
"xldn1252pap",
"xldn1271pap",
"xldn1278pap",
"xldn1297pap",
"xldn1299pap"
]
}