getTopServiceSituationStats
A GET request that returns the number of active Situations impacting a top service in the specified time range. Top services are the services that have the most situations impacting them.
Back to Stats API.
Request arguments
Endpoint getTopServiceSituationStats
takes the following request arguments.
Response
Endpoint getTopServiceSituationStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | The name of the service |
| 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 getTopServiceSituationStats
:
Request example
A cURL request to retrieve the number of Situations impacting top services between 12pm and midnight on Saturday, 15th September 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getServiceSituationStats" --data-urlencode 'from=1537012800' --data-urlencode 'to=1536969600' --data-urlencode 'aggregation=sum'
Response example
A successful response returns the number of Situations each hour for the 12 hour range:
[{ "datapoints": [ [10.0, 1538133600000], [12.0, 1538133600000], [8.0, 1538133600000], [5.0, 1538133600000], [9.0, 1538133600000], [6.0, 1538133600000], [10.0, 1538133600000], [13.0, 1538133600000], [11.0, 1538133600000], [7.0, 1538133600000], [9.0, 1538133600000], [1.0, 1538133600000] ], "target": "Web Service" }, { "datapoints": [ [7.0, 1538133600000], [3.0, 1538133600000], [6.0, 1538133600000], [14.0, 1538133600000], [9.0, 1538133600000], [8.0, 1538133600000], [12.0, 1538133600000], [11.0, 1538133600000], [8.0, 1538133600000], [4.0, 1538133600000], [6.0, 1538133600000], [3.0, 1538133600000]], "target": "Cloud Service" }]