Skip to main content

getAcknowledgedSituationsPerUserStats

A GET request that returns the number of Situations acknowledged by a specific user or users within a given time range.

Back to Stats API.

Request arguments

Endpoint getAcknowledgedSituationsPerUserStats takes the following request arguments.

Response

Endpoint getAcknowledgedSituationsPerUserStats returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Acknowledged Situations (full 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 acknowledged by the user.

  • Less than 1 week: Returns the number of Situations acknowledged each hour in the time period.

  • 1 week to 1 month: Returns the number of Situations acknowledged each day in the time period.

  • 1 month to 1 year: Returns the number of Situations acknowledged each week in the time period.

  • More than 1 year: Returns the number of Situations acknowledged each month in the time period.

Examples

The following examples demonstrate typical use of endpoint getAcknowledgedSituationsPerUserStats:

Request example

A cURL request to return the number of Situations acknowledged by user Bob from 9am on Friday 28th September until 3pm on Friday 28th September 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getAcknowledgedSituationsPerUserStats" --data-urlencode 'users=[6]' --data-urlencode 'from=1538121620' --data-urlencode 'to=1538143220'

Response example

A successful response returns the number of Situations acknowledged by Bob each hour during that time frame:

[{
        "datapoints":[
                [2.0,1538121620000],
                [3.0,1538125220000],
                [0.0,1538128820000],
                [2.0,1538132420000],
                [2.0,1538136020000],
                [2.0,1538139620000]
        ],
        "target":"Acknowledged Situations (Bob Bowden)"
}]