A GET request that returns the number of open Situations assigned to a user at each data point.
Back to Stats API.
Endpoint getOpenSituationsPerUserStats
takes the following request arguments.
Endpoint getOpenSituationsPerUserStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | "Open Situations (full name)" |
| 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 getOpenSituationsPerUserStats
:
A cURL request to return the number of open Situations assigned to user 6 from 9.19am on Monday, 17th September until 16.19am on Monday, 17th September 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getOpenSituationsPerUserStats" --data-urlencode 'users=[6,7]' --data-urlencode 'from=1537175946' --data-urlencode 'to=1537201140' --data-urlencode 'aggregation=none'
A successful response returns the number of open Situations assigned to the users Oscar and Olivia each hour during the time range:
[{
"datapoints":[
[12.0,1537175946000],
[8.875,1537262346000],
[10.0,1537348746000],
[8.9,1537435146000],
[10.75,1537521546000],
[9.25,1537607946000],
[8.1667,1537694346000]
],
"target":"Open Situations (Oscar O'Neill)"
},
{
"datapoints":[
[4.0,1537175946000],
[5.0,1537262346000],
[12.0,1537348746000],
[7.0,1537435146000],
[3.0,1537521546000],
[9.0,1537607946000],
[8.0,1537694346000]
],
"target":"Open Situations (Andrew Anderson)"
}
]