Skip to main content

getResolvedSituationsPerUserStats

A GET request that returns the number of Situations resolved by a user within a given time range.

Back to Stats API.

Request arguments

Endpoint getResolvedSituationsPerUserStats takes the following request arguments.

Response

Endpoint getResolvedSituationsPerUserStats returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Resolved 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 resolved by the user.

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

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

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

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

Examples

The following examples demonstrate typical use of endpoint getResolvedSituationsPerUserStats:

Request example

A cURL request to return the number of Situations resolved by user 5 from 8.47am until 15.04pm on October 1st 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getResolvedSituationsPerUserStats" --data-urlencode 'users=[5]' --data-urlencode 'from=1538380070' --data-urlencode 'to=1538402670' --data-urlencode 'aggregation=none'

Response example

A successful response returns the number of Situations resolved by the user Alice each hour during the time range:

[{
        "datapoints":[
                [5.0,1538380070000],
                [3.0,1538383670000],
                [8.0,1538387270000],
                [0.0,1538390870000],
                [0.0,1538394470000],
                [8.0,1538398070000],
        ],
        "target":"Resolved Situations (Alice Anderson)"
}]