getAssignedSituationsPerUserStats
A GET request that returns the number of Situations assigned to a specific user or users within a given time range.
Back to Stats API.
Request arguments
Endpoint getAssignedSituationsPerUserStats
takes the following request arguments.
Response
Endpoint getAssignedSituationsPerUserStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | "Assigned Situations (full name)" |
| 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 getAssignedSituationsPerUserStats
:
Request example
A cURL request to return the number of Situations assigned to users 10 and 11 from 11pm on Tuesday, 25th September 2018 until 11pm on Wednesday, 26th September 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getAssignedSituationsPerUserStats" --data-urlencode 'users=[10,11]' --data-urlencode 'from=1537916400' --data-urlencode 'to=1538002799' --data-urlencode 'aggregation=sum'
Response example
A successful response returns the number of Situations assigned to the users Frank and Dave each hour during the time range:
[{ "datapoints":[ [10.0,1537916400000], [5.0,1537920000000], [7.0,1537923600000], [7.0,1537927200000], [7.0,1537930800000], [1.0,1537934400000], [5.0,1537938000000], [6.0,1537941600000], [9.0,1537945200000], [9.0,1537948800000], [7.0,1537952400000], [8.0,1537956000000] ], "target":"Assigned Situations (Frank Fuller/Dave Danton)" }]