A GET request that returns the number of Situations a user has viewed within a given time range. Moogsoft Onprem considers a user to have viewed a Situation if they opened the Situation Room.
Back to Stats API.
Endpoint getViewedSituationsPerUserStats
takes the following request arguments.
Endpoint getViewedSituationsPerUserStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | "Viewed 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 getViewedSituationsPerUserStats
:
A cURL request to return the number of viewed Situations by user 7 from 9am until 3pm on Thursday, 20th September 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getViewedSituationsPerUserStats" --data-urlencode 'users=[7]' --data-urlencode 'from=1537434000' --data-urlencode 'to=1537455600' --data-urlencode 'aggregation=none'
A successful response returns the number of Situations viewed by the user Charlie each hour during the time range:
[{
"datapoints":[
[16.0,1537434000000],
[26.0,1537437600000],
[18.0,1537441200000],
[34.0,1537444800000],
[18.0,1537448400000],
[11.0,1537452000000]
],
"target":"Viewed Situations (Charlie Cooper)"
}]