Moogsoft Docs

getServiceSituationPerTeamStats

A GET request that returns the number of Situations impacting each service for a team.

Back to Stats API.

Request arguments

Endpoint getServiceSituationPerTeamStats takes the following request arguments.

Response

Endpoint getServiceSituationPerTeamStats 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 impacting services.

Examples

The following examples demonstrate typical use of endpoint getServiceSituationPerTeamStats:

Request example

A cURL request to retrieve the number of Situations associated with the Cloud DevOps team that are impacting the Commerce and Compute services between 12pm and 6pm on Friday, August 10th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getServiceSituationPerTeamStats" --data-urlencode 'from=1533902400' --data-urlencode 'to=1533924000' --data-urlencode 'teams=[1]' --data-urlencode 'services=[1, 2]' --data-urlencode 'aggregation=none'
Response example

A successful request returns the number of Situations impacting the services each hour during the six hour time range:

[{
        "datapoints":[
                [7.0,1533902400000],
                [18.0,1533906000000],
                [18.0,1533909600000],
                [13.0,1533913200000],
                [9.0,1533916800000],
                [12.0,1533920400000]],
        "target":"Commerce"},
{
        "datapoints":[
                [14.0,1533902400000],
                [15.0,1533906000000],
                [6.0,1533909600000],
                [12.0,1533913200000],
                [1.0,1533916800000],
                [11.0,1533920400000]],
        "target":"Compute"
}]