A GET request that returns the number of Situations by severity per team for a given time range.
Back to Stats API.
Endpoint getSeveritySituationPerTeamStats
takes the following request arguments.
Endpoint getSeveritySituationPerTeamStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | The name of the status. |
| 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 getSeveritySituationPerTeamStats
:
A cURL request to retrieve the number of clear Situations for the Cloud DevOps team between between 12pm onThursday, August 9th and 12pm on Friday, August 10th 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSeveritySituationPerTeamStats" --data-urlencode 'from=1533816000' --data-urlencode 'to=1533902400' --data-urlencode 'teams=[1]' --data-urlencode 'severity=[0]' --data-urlencode 'aggregation=none'
A successful response returns the number of clear Situations each hour over the past 24 hours:
[{
"datapoints":[
[13.0,1533816000000],
[14.0,1533819600000],
[6.0,1533823200000],
[10.0,1533826800000],
[14.0,1533830400000],
[5.0,1533834000000],
[19.0,1533837600000],
[17.0,1533841200000],
[4.0,1533844800000],
[13.0,1533848400000],
[7.0,1533852000000],
[15.0,1533855600000],
[6.0,1533859200000],
[10.0,1533862800000],
[16.0,1533866400000],
[20.0,1533870000000],
[19.0,1533873600000],
[15.0,1533877200000],
[15.0,1533880800000],
[5.0,1533884400000],
[20.0,1533888000000],
[3.0,1533891600000],
[1.0,1533895200000],
[4.0,1533898800000]],
"target":"Clear"
}]