Skip to main content

getChatOpsToolExecutedPerUserStats

A GET request that returns the number of ChatOps tools executed by a user each hour within a given time range.

Back to Stats API.

Request arguments

Endpoint getChatOpsToolExecutedPerUserStats takes the following request arguments.

Response

Endpoint getChatOpsToolExecutedPerUserStats returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Chat Ops Tools executed (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 ChatOps tools executed by the user.

  • Less than 1 week: Returns the number of ChatOps tools executed each hour in the time period.

  • 1 week to 1 month: Returns the number of ChatOps tools executed each day in the time period.

  • 1 month to 1 year: Returns the number of ChatOps tools executed each week in the time period.

  • More than 1 year: Returns the number of ChatOps tools executed each month in the time period.

Examples

The following examples demonstrate typical use of endpoint getChatOpsToolExecutedPerUserStats:

Request example

A cURL request to retrieve the total number of ChatOps tools executed by user 5 from 11pm on Sunday, 14th October until 11pm on Monday, 15th October 2018:

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

Response example

A successful response returns the number of ChatOps tools executed by the user Max each hour:

[{
        "datapoints":[
                [6.0,1539558000000],
                [24.0,1539561600000],
                [1.0,1539565200000],
                [0.0,1539568800000],
                [14.0,1539572400000],
                [10.0,1539576000000],
                [4.0,1539579600000],
                [12.0,1539583200000],
                [25.0,1539586800000],
                [8.0,1539590400000],
                [0.0,1539598043846] 
        ],
                "target":"ChatOps Tools executed (Max Matthews)"
}]