getInvitationsReceivedPerUserStats
A GET request that returns the number of Situation invitations received for a given user each hour within a given time range.
Back to Stats API.
Request arguments
Endpoint getInvitationsReceivedPerUserStats
takes the following request arguments.
Response
Endpoint getInvitationsReceivedPerUserStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | "Invitations Received (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 getInvitationsReceivedPerUserStats
:
Request example
A cURL request for the number of Situation invitations for users 7 and 8 from midnight on Sunday, 14th October until 6am on Monday, 15th October 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getInvitationsReceivedPerUserStats" --data-urlencode 'users=[7,8]' --data-urlencode 'from=1539558000' --data-urlencode 'to=1539583200' --data-urlencode 'aggregation=none'
Response example
A successful response returns the number of invitations for users 7 and 8:
[{ "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], [1.0,1539579600000], [2.0,1539583200000], [0.0,1539586800000], ], "target": "Invitations Received (Peter Parker/Kat Knight)" }]