getAlertsInNewSituationsStats
A GET request that returns the number of alerts that belong to new Situations during the specified time range.
Back to Stats API.
Request arguments
Endpoint getAlertsInNewSituationsStats
takes the following request arguments.
Response
Endpoint getAlertsInNewSituationsStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | "Alerts in new situations" |
| Number Array | An array of data points. Each data point is an array in the format [data point, timestamp]:
|
Examples
The following examples demonstrate typical use of endpoint getAlertsInNewSituationsStats
:
Request example
A cURL GET request for all alerts in new Situations over a 24 hour time range from 13.23pm on Tuesday 18th September until 13:24pm on Wednesday 19th September 2018::
curl -G -u graze:graze -k -v "https://freida7/graze/v1/getAlertsInNewSituationsStats" --data-urlencode 'from=1537277017' --data-urlencode 'to=1537363453'
Response example
A successful response indicating there were 56 alerts at13:23pm on Wednesday 19th September 2018:
[ {"datapoints":[ [56.0,1537359817000] ], "target":"Alerts in new situations"} ]