getClosedSituationsPerUserStats
A GET request that returns the number of Situations that a user has closed each hour within a given time range.
Back to Stats API.
Request arguments
Endpoint getClosedSituationsPerUserStats
takes the following request arguments.
Response
Endpoint getClosedSituationsPerUserStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | "Closed 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 getClosedSituationsPerUserStats
:
Request example
A cURL request to return the number of Situations closed by user 5 from 6am until midnight on October 1st 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getClosedSituationsPerUserStats" --data-urlencode 'users=[5]' --data-urlencode 'from=1538373600' --data-urlencode 'to=1538395200' --data-urlencode 'aggregation=none'
Response example
A successful response returns the number of Situations closed by user Chris each hour during the time range:
[{ "datapoints":[ [1.0,1539558000000], [1.0,1539561600000], [2.0,1539565200000], [5.0,1539568800000], [0.0,1539572400000], [7.0,1539576000000], [1.0,1539579600000], [0.0,1539583200000], [8.0,1539586800000], [6.0,1539590400000], [0.0,1539594000000], [0.0,1539597600000] ], "target":"Closed Situations (Chris Collins)" }]