Skip to main content

getSystemSituationStats

A GET request that returns the number of active Situations in the specified time range.

Back to Stats API.

Request arguments

Endpoint getSystemSituationStats takes the following request arguments.

Response

Endpoint getSystemSituationStats returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"System"

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 getSystemSituationStats:

Request example

A cURL request to retrieve the number of active Situations from 11.09am on Sunday, 17th December until 11.09am on Monday, 18th December 2017:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSystemSituationStats" --data-urlencode 'from=1513508950' --data-urlencode 'to=1513595370'

Response example

A successful response returns the number of active Situations every hour during that time range:

[{
        "datapoints": [
                [66.0, 1513657700000],
                [98.0, 1513661300000],
                [102.0, 1513664900000],
                [106.0, 1513668500000],
                [92.0, 1513672100000],
                [88.0, 1513675700000],
                [86.0, 1513679300000],
                [74.0, 1513682900000],
                [85.0, 1513672100000],
                [83.0, 1513675700000],
                [79.0, 1513679300000],
                [68.0, 1513686500000]
        ],
        "target": "Open Situations"
}]