Moogsoft Docs

getStatusSituationPerTeamStats

A GET request that returns the number of Situations by status for a team over a given time range.

Back to Stats API.

Request arguments

Endpoint getStatusSituationPerTeamStats takes the following request arguments.

Response

Endpoint getStatusSituationPerTeamStats 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 getStatusSituationPerTeamStats:

Request example

A cURL request to return all Situations by status for the Cloud DevOps team from 8.30am until 2.30pm on Saturday, September 1st 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getStatusSituationPerTeamStats" --data-urlencode 'from=1535790600' --data-urlencode 'to=1535812200' --data-urlencode 'teams=[1]' --data-urlencode 'status=[]' --data-urlencode 'aggregation=none'
Response example

A successful response returns the number of Situations by status each hour for the six hour range:

[
        {"datapoints":[
                [19.0,1535790600000],
                [20.0,1535794200000],
                [17.0,1535797800000],
                [18.0,1535801400000],
                [17.0,1535805000000],
                [17.0,1535808600000]],
                "target":"Opened"},
        {"datapoints":[
                [3.0,1535790600000],
                [7.0,1535794200000],
                [4.0,1535797800000],
                [10.0,1535801400000],
                [10.0,1535805000000],
                [2.0,1535808600000]],
                "target":"Assigned"},
        {"datapoints":[
                [3.0,1535790600000],
                [5.0,1535794200000],
                [10.0,1535797800000],
                [3.0,1535801400000],
                [5.0,1535805000000],
                [2.0,1535808600000]],
                "target":"Acknowledged"},
        {"datapoints":[
                [3.0,1535790600000],
                [3.0,1535794200000],
                [4.0,1535797800000],
                [3.0,1535801400000],
                [3.0,1535805000000],
                [2.0,1535808600000]],
                "target":"Unacknowledged"},
        {"datapoints":[
                [46.0,1535790600000],
                [48.0,1535794200000],
                [32.0,1535797800000],
                [48.0,1535801400000],
                [34.0,1535805000000],
                [36.0,1535808600000]],
                "target":"Resolved"}
]