Skip to main content

getAlertsMarkedPRCPerUserStats

A GET request that returns the total number of alerts marked with probable root cause (PRC) feedback by each user.

Back to Stats API.

Request arguments

Endpoint getAlertsMarkedPRCPerUserStats takes the following request arguments.

Response

Endpoint getAlertsMarkedPRCPerUserStats returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Alerts Marked PRC (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 alerts marked with PRC feedback by the user.

  • Less than 1 week: Returns the number of alerts marked with PRC feedback each hour in the time period.

  • 1 week to 1 month: Returns the number of alerts marked with PRC feedback each day in the time period.

  • 1 month to 1 year: Returns the number of alerts marked with PRC feedback each week in the time period.

  • More than 1 year: Returns the number of alerts marked with PRC feedback each month in the time period.

Examples

The following examples demonstrate typical use of endpoint getAlertsMarkedPRCPerUserStats:

Request example

A cURL request to return the number of alerts marked with PRC feedback to users 5 and 6 from 8am until 2pm on on Friday, 28th September 2018:

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

Response example

A successful response returns the number of alerts that users Alice and Ian have marked with PRC feedback each hour during the time range:

[{
        "datapoints":[
                [22.0,1538121620000],
                [18.0,1538125220000],
                [30.0,1538128820000],
                [23.0,1538132420000],
                [29.0,1538136020000],
                [28.0,1538139620000]]
        ],
        "target":"Alerts Marked PRC (Alice Anderson)"
}
{
        "datapoints":[
                [34.0,1538121620000],
                [20.0,1538125220000],
                [35.0,1538128820000],
                [21.0,1538132420000],
                [19.0,1538136020000],
                [10.0,1538139620000]]
        ],
        "target":"Alerts Marked PRC (Ian Ince)"
}]