Moogsoft Docs

getStatusSituationStats

A GET request that returns the number of Situations by status.

Back to Stats API.

Request arguments

Endpoint getStatusSituationStats takes the following request arguments.

Response

Endpoint getStatusSituationStats returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The status name.

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

[Delete all except the appropriate Time Period box or complete the custom list if not supplied. Delete this para!]

Examples

The following examples demonstrate typical use of endpoint getStatusSituationStats:

Request example

A cURL request to retrieve the number of opened and assigned Situations from 15.27pm on Sunday, January 14th until 15.27pm on Monday, 15th January 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getStatusSituationStats" --data-urlencode 'from=1515943678' --data-urlencode 'to=1516030078' --data-urlencode 'status=[1, 2]' --data-urlencode 'aggregation=sum'

Response example

Example response returning the number of Situations for each status: :

[{
        "datapoints": [
                [32.0, 1516008478000],
                [54.0, 1516030078000]
                [68.0, 1516030078000]
                [82.0, 1516030078000]
                [88.0, 1516030078000]
        ],
        "target": "Opened"
}, {
        "datapoints": [
                [5.0, 1515947278000],
                [12.0, 1515958078000],
                [25.0, 1515976078000],
                [31.0, 1515994078000],
                [40.0, 1516015678000]
        ],
        "target": "Assigned"
}]