Skip to main content

getTeamSituationStats

A GET request that returns the number of active Situations assigned to a team for a given time range.

Back to Stats API.

Request arguments

Endpoint getTeamSituationStats takes the following request arguments.

Response

Endpoint getTeamSituationStats returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the team.

datapoints

Number Array

An array of data points. Each data point is an array in the format [data point, timestamp]:

  1. Data point: Number of Situations for each status.

Examples

The following examples demonstrate typical use of endpoint getTeamSituationStats:

Request example

A cURL request to return the number of active Situations assigned to the Cloud DevOps and Application Performance Monitoring teams from midnight until 6am on Monday, 20th August 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getTeamSituationStats" --data-urlencode 'teams=[1,2]' --data-urlencode 'from=1534723200' --data-urlencode 'to=1534744800' --data-urlencode 'aggregation=none'

Response example

A successful response returns the number of Situations assigned each hour to each team for the six hour range:

[
        {"datapoints":[
                [30.0,1534723200000],
                [20.0,1534726800000],
                [24.0,1534730400000],
                [19.0,1534734000000],
                [28.0,1534737600000],
                [23.0,1534741200000]],
                "target":"Cloud DevOps"},
        {"datapoints":[
                [26.0,1534723200000],
                [29.0,1534726800000],
                [15.0,1534730400000],
                [29.0,1534734000000],
                [25.0,1534737600000],
                [22.0,1534741200000]],
                "target":"Application Performance Monitoring"]