Moogsoft Docs

getCommentCountPerTeamStats

A GET request that returns the total number of comments each hour for a specific team or teams in a given time range.

Back to Stats API.

Request arguments

Endpoint getCommentCountPerTeamStats takes the following request arguments.

Response

Endpoint getCommentCountPerTeamStats returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

Name of the team.

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 comments.

Examples

The following examples demonstrate typical use of endpoint getCommentCountPerTeamStats:

Request example

A cURL request to retrieve the total number of comments for three teams each hour over a 24 hour time range from 6am on Wednesday 19th September until 6am on Thursday 20th September 2018:

curl -G -u graze:graze -k -v "https://freida7/graze/v1/getCommentCountPerTeamStats" --data-urlencode 'teams=[1,2,3]' --data-urlencode 'from=1537336800' --data-urlencode 'to=1537423200' --data-urlencode 'aggregation=none' 

Response example

A successful response returns the number of comments per hour for the Cloud DevOps, Database DevOps and Switch DevOps teams:

[
        {"datapoints":[
                [14.0,1537357717000]],
                "target":"Cloud DevOps"},
        {"datapoints":[
                [22.0,1537357717000]],
                "target":"Database DevOps"},
        {"datapoints":[
                [10.0,1537357717000]],
                "target":"Switch DevOps"}
]