A GET request that returns the number of new Situations created in the specified time range.
Back to Stats API.
Endpoint getNewSituationsStats
takes the following request arguments.
Endpoint getNewSituationsStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | "New Situations" |
| Number Array | An array of data points. Each data point is an array in the format [data point, timestamp]:
|
The following examples demonstrate typical use of endpoint getNewSituationsStats
:
Example cURL request to retrieve the number of new Situations over a week from 6am on Saturday, September 1st until 6am on Saturday, September 8th 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getNewSituationsStats" --data-urlencode 'from=1535781600' --data-urlencode 'to=1536386400'
Example response returning the number of new Situations for each day during the week range:
[
{"datapoints":[
[601.0,1535781600000],
[523.0,1535868000000],
[597.0,1535954400000],
[618.0,1536040800000],
[535.0,1536127200000],
[628.0,1536213600000],
[618.0,1536300000000]
],
"target":"New situations"}
]