Moogsoft Docs

Stats API

You can use the Stats API endpoints to report on Moogsoft AIOps data.

These endpoints return various statistics about teams, Situations and services. You can also fetch information on the Mean Time to Acknowledge (MTTA), Mean Time to Detect (MTTD) and Mean Time to Resolve (MTTR).

System Endpoints

The following endpoints return data statistics relating to your Moogsoft AIOps system:

getAlertsInNewSituationsStats

A GET request that returns the number of alerts that belong to new Situations during a given time range.

Request Arguments

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

"accumulate" - gradually adds data points together over time.

"none" - no aggregation of data points.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Alerts in new situations"

datapoints

Number array

An array of data points. Each data point is an array in the format [datapoint, timestamp]:

  1. Data point: Number of alerts.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

  • More than 1 year Returns the number of alerts each month in the time period.

Request Example

A cURL command that requests all alerts in new Situations over a 24 hour time range from 13.23pm on Tuesday 18th September until 13:24pm on Wednesday 19th September 2018:

curl -G -u graze:graze -k -v "https://freida7/graze/v1/getAlertsInNewSituationsStats" --data-urlencode 'from=1537277017' --data-urlencode 'to=1537363453'

Response Example

A successful response indicating there were 56 alerts at13:23pm on Wednesday 19th September 2018:

[
        {"datapoints":[
        [56.0,1537359817000]
        ],
        "target":"Alerts in new situations"}
]
getMTTAStats

A GET request that returns the Mean Time To Acknowledge (MTTA) Situations in a system over time.

The time to acknowledge (TTA) for a Situation is the duration from the first event's inclusion in the Situation to the time when a moderator assigns a Situation to a user in Moogsoft AIOps.

Request Arguments

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

Response

Type

Description

HTTP code

HTTP status or error codeindicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Mean Time to Acknowledge (MTTA)"

datapoints

Number array

An array of data points. Each data point is an array in the format [data point, timestamp]:

  1. Data point: MTTA (seconds) for that bucket.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of the data points per time unit the request returns. For example:

  • Less than 1 week: Returns the MTTA each hour in the time period.

  • 1 week to 1 month: Returns the MTTA each day in the time period.

  • 1 month to 1 year: Returns the MTTA each week in the time period.

  • More than 1 year: Returns the MTTA each month in the time period.

Request Example

A cURL command to return the MTTA for Moogsoft AIOps over a 24 hour time range from 11.09am on Sunday 17th December until 11.09am on Monday 18th December 2017:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getMTTAStats" --data-urlencode 'from=1513508950' --data-urlencode 'to=1513595370'

Response Example

A successful response returns the MTTA in seconds for each hour:

[{
        "datapoints": [
                [312.0, 1513657700000],
                [209.0, 1513661300000],
                [101.0, 1513664900000],
                [114.0, 1513668500000],
                [203.0, 1513672100000],
                [120.0, 1513675700000],
                [201.0, 1513679300000],
                [90.0, 1513682900000],
                [100.0, 1513686500000]
        ],
        "target": "Mean Time to Acknowledge (MTTA)"
}]
getMTTDStats

A GET request that returns the Mean Time To Detect (MTTD) Situations in the system over time. The time to detect (TTD) for a Situation is the duration from the first event's inclusion in the Situation to the Situation creation time.

Request Arguments

Name

Type

Description

from

Number

Start of the time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

Response

Type

Description

HTTP code

HTTP status or error codeindicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Mean Time to Detect (MTTD)"

datapoints

Number array

An array of data points. Each data point is an array in the format [data point, timestamp]:

  1. Data point: MTTD (seconds) for that bucket.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of the data points per time unit the request returns. For example:

  • Less than 1 week: Returns the MTTD each hour in the time period.

  • 1 week to 1 month: Returns the MTTD each day in the time period.

  • 1 month to 1 year: Returns the MTTD each week in the time period.

  • More than 1 year: Returns the MTTD each month in the time period.

Request Example

A cURL request to retrieve the MTTD for Moogsoft AIOps from 11.09am on Sunday 17th December until 11.09am on Sunday 24th December 2017:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getMTTDStats" --data-urlencode 'from=1513508950' --data-urlencode 'to=1514113750'

Response Example

Successful request returns the MTTD for the 24 hour time frame:

[{
        "datapoints": [
                [272.0, 1514113750000],
        ],
        "target": "Mean Time to Detect (MTTD)"
}]
getMTTRStats

A GET request that returns the Mean Time To Resolve (MTTR) for Situations in the system over a given range of time.The TTR for a Situation is the duration from the first event in the Situation to the time when a user resolved the Situation.

Request Arguments

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last data point returned is the current state data point.

Response

Type

Description

HTTP code

HTTP status or error codeindicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Mean Time to Resolve (MTTR)"

datapoints

Number array

An array of data points. Each data point is an array in the format [datapoint, timestamp]:

  1. Data point: MTTR (seconds) for that bucket.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

  • Less than 1 week: Returns the MTTR each hour in the time period.

  • 1 week to 1 month: Returns the MTTR each day in the time period.

  • 1 month to 1 year: Returns the MTTR each week in the time period.

  • More than 1 year: Returns the MTTR each month in the time period.

Request Example

A cURL request to retrieve the MTTR for Moogsoft AIOps from 11.30am on Sunday, September 24th 2017 until 11.30am on Sunday, September24th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getMTTRStats" --data-urlencode 'from=1506252610' --data-urlencode 'to=1537788610'

Response Example

A successful response indicates the MTTR for the year was 2.72 minutes:

[{
        "datapoints": [
                [163.54,1537784877233]
        ],
        "target":"Mean Time to Resolve (MTTR)"
}]
getNewAlertsStats

A GET request that returns the number of new alerts over a given time range.

Request Arguments

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

"accumulate" - gradually adds data points together over time.

"none" - no aggregation of data points.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Alerts"

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.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of new alerts between Wednesday, January 17th and Thursday, January 18th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getNewAlertsStats" --data-urlencode 'from=1516216020' --data-urlencode 'to=1516282420'

Response Example

Successful response indicates there were 28,542 new alerts over the 24 hour time period:

[
        {"datapoints":[
                [28542.0,1523438216685]
        ],
        "target":"New Alerts"}
]
getNewAlertsPerSituationsStats

A GET request that returns the percentage alert to Situation noise reduction for a given time range.

Request Arguments

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Alerts per Situation"

datapoints

Number array

An array of data points. Each data point is an array in the format [data point, timestamp]:

  1. Data point: Percentage noise reduction (alert to Situation reduction).

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

  • Less than 1 week: Returns the percentage noise reduction each hour in the time period.

  • 1 week to 1 month: Returns the percentage noise reduction each day in the time period.

  • 1 month to 1 year: Returns the percentage noise reduction each week in the time period.

  • More than 1 year: Returns the percentage noise reduction each month in the time period.

Request Example

A cURL request to retrieve the percentage noise reduction from 7.07pm on Wednesday, 17th January 2018 until 1.33pm on Thursday, 18th January 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getNewAlertsPerSituationsStats" --data-urlencode 'from=1516216020' --data-urlencode 'to=1516282420'

Response Example

A successful response indicating a noise reduction of 78.5% in the number of alerts to Situations:

[
        {"datapoints":[
                [78.5,1523438216685]
        ],
        "target":"New Alerts per Situation"}
]
getNewEventsPerAlertsStats

A GET request that returns the percentage event to alert noise reduction over a given time range.

Request Arguments

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Events per Alerts"

datapoints

Number array

An array of data points. Each data point is an array in the format [data point, timestamp]:

  1. Data point: Percentage noise reduction (event to alert reduction).

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

  • Less than 1 week: Returns the percentage noise reduction each hour in the time period.

  • 1 week to 1 month: Returns the percentage noise reduction each day in the time period.

  • 1 month to 1 year: Returns the percentage noise reduction each week in the time period.

  • More than 1 year: Returns the percentage noise reduction each month in the time period.

Request Example

A cURL request that retrieves that event to alert noise reduction in Moogsoft AIOps from 7.07pm on Wednesday, 17th January until 7.07pm on Thursday, 18th January 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getNewEventsPerAlertsStats" --data-urlencode 'from=1516216020' --data-urlencode 'to=1516302431'

Response Example

A successful response indicating a 58% noise reduction:

[
        {"datapoints":[
                [58.0,1523438216685]
        ],
        "target":"New Events per Alerts"}
]
getNewEventsPerSituationsStats

A GET request that returns the percentage event to Situation noise reduction over a given time range.

Request Arguments

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Events per Situation"

datapoints

Number array

An array of data points. Each data point is an array in the format [data point, timestamp]:

  1. Data point: Percentage noise reduction (event to Situation reduction).

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

  • Less than 1 week: Returns the percentage noise reduction each hour in the time period.

  • 1 week to 1 month: Returns the percentage noise reduction each day in the time period.

  • 1 month to 1 year: Returns the percentage noise reduction each week in the time period.

  • More than 1 year: Returns the percentage noise reduction each month in the time period.

Request Example

A cURL request that retrieves the percentage noise reduction for the past month ranging from 10.28am on Sunday, August 26th until 10.28am on Wednesday, September 26th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getNewEventsPerSituationsStats" --data-urlencode 'from=1533103200' --data-urlencode 'to=1535695200'

Response Example

A successful responses returns an 95% to 96% reduction in events to Situations for each week over the past month:

[
        {
        "datapoints":[
                [95.86151338591529,1535279280000],
                [95.79150698161867,1535884080000],
                [95.62050414072417,1536488880000],
                [96.08938014241262,1537093680000],
                [95.96508799542137,1537698480000]
        ],
        "target":"New Events per Situation"
        }
]
getNewSituationsStats

A GET request that returns the number of new Situations created over a given time range.

Request Arguments

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Situations"

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 new Situations.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of new Situations over a week from 6am on Saturday, September 1st until 6am on Saturday, September 8th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getNewSituationsStats" --data-urlencode 'from=1535781600' --data-urlencode 'to=1536386400'

Response Example

A successful response returns the number of new Situations for each day during the week range:

[
        {"datapoints":[
                [601.0,1535781600000],
                [523.0,1535868000000],
                [597.0,1535954400000],
                [618.0,1536040800000],
                [535.0,1536127200000],
                [628.0,1536213600000],
                [618.0,1536300000000]
        ],
        "target":"New situations"}
]
getReassignedSituationStats

A GET request that returns the number of Situations reassigned in the system over a given range of time. A reassigned Situation is a Situation that a user has assigned to another user at least twice.

Request Arguments

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Reassigned Situation"

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 reassigned Situations.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of reassigned Situations over a month from 6am on Wednesday, August 1st until 6am on Saturday, September 1st 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getReassignedSituationStats" --data-urlencode 'from=1533103200' --data-urlencode 'to=1535781600'

Response Example

A successful response returns the number of reassigned Situations for each week during the month:

[{
        "datapoints": [
                [25.125,1533103200000],
                [24.1369,1533708000000],
                [25.9405,1534312800000],
                [24.8512,1534917600000],
                [25.1071,1535522400000],
        ],
        "target": "Reassigned Situation"
}]
getReoccurringSituationStats

A GET request that returns the percentage of reoccurring situations in the system over a given time range.

Request Argument

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Reoccurring Situations"

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 reoccurring Situations.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of reoccurring Situations from 6pm on Sunday, September 10th 2017 until 6pm on Monday, September 10th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getReoccurringSituationStats" --data-urlencode 'from=1505066400' --data-urlencode 'to=1536602400'

Response Example

A successful response returns that there were 186 reoccurring Situations during the year:

[{
        "datapoints": [
                [186.0, 1537980650126],
        ],
        "target": "Reoccurring situations"
}]
getServiceSituationStats

A GET request that returns the number of active Situations impacting a service over a given time range.

Request Argument

Name

Type

Description

services

Array

An array of services IDs. This is optional. If no services are provided, the endpoint does not return any data.

from

Number

Start of the time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

"sum" - for an aggregation of all teams provided.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

Service name(s).

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 impacting services.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of Situations impacting the Commerce/Compute service between 12pm and 6pm on Friday, August 10th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getServiceSituationStats" --data-urlencode 'services=[1,2]' --data-urlencode 'from=1533902400' --data-urlencode 'to=1533924000' --data-urlencode 'aggregation=sum'

Response Example

A successful response returns six data points for each hour during the six hour time range:

[{
        "datapoints": [
                [95.0,1533902400000],
                [85.0,1533906000000],
                [47.0,1533909600000],
                [7.0,1533913200000],
                [33.0,1533916800000],
                [66.0,1533920400000]
        ],
        "target":"Commerce/Compute"
}]
getSeveritySituationStats

A GET request that returns the number of Situations by severity over a given time range.

Request Argument

Name

Type

Description

severity

Array

An array of severity IDs. This is optional. If not given, it returns the default set of severities: Clear, Indeterminate, Warning, Minor, Major, Critical.

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last data point returned is the current state datapoint.

aggregation

String

"sum" - for an aggregation of all teams provided.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the status.

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 per severity.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Input Example

A cURL request to retrieve the sum of the major and critical Situations between 12pm on Thursday, August 9th and 12pm on Friday, August 10th 2018:

curl -G -u graze:graze -k -v "https://daffy.moogsoft.com/graze/v1/getSeveritySituationStats" --data-urlencode 'from=1533816000' --data-urlencode 'to=1533902400' --data-urlencode 'severity=[5, 4]' --data-urlencode 'aggregation=sum'

Output Example

A successful response returns 24 data points, one for each hour over the 24 hour range:

[{
        "datapoints":[
                [51.0,1533816000000],
                [44.0,1533819600000],
                [88.0,1533823200000],
                [84.0,1533826800000],
                [25.0,1533830400000],
                [34.0,1533834000000],
                [82.0,1533837600000],
                [58.0,1533841200000],
                [61.0,1533844800000],
                [52.0,1533848400000],
                [15.0,1533852000000],
                [50.0,1533855600000],
                [54.0,1533859200000],
                [50.0,1533862800000],
                [81.0,1533866400000],
                [78.0,1533870000000],
                [84.0,1533873600000],
                [28.0,1533877200000],
                [54.0,1533880800000],
                [36.0,1533884400000],
                [44.0,1533888000000],
                [47.0,1533891600000],
                [60.0,1533895200000],
                [54.0,1533898800000]],
        "target":"Critical/Major"
}]
getStats

A GET request that retrieves all available Stats API endpoints along with their description and request parameters.

Request Arguments

None required.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Request Example

A cURL request to return all available Stats API endpoints:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getStats" 

Response Example

A successful response with all of the endpoints, descriptions and associated parameters:

[
 {  
   "endpoint":"getTeamSituationStats",
   "description":"returns the number of active situations assign to a team over time",
   "display_name":"Open Situations by Team",
   "parameters":{  
      "teams":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getTeams",
            "value":"team_id"
         },
         "type":"mapped",
         "required":false
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getTopTeamSituationStats",
   "description":"returns the number of active situations assign to a top team over time",
   "display_name":"Open Situations by Top Team",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getServiceSituationStats",
   "description":"returns the number of active situations impacting a service over time",
   "display_name":"Open Situations by Service",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "services":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getServices",
            "value":"service_id"
         },
         "type":"mapped",
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getTopServiceSituationStats",
   "description":"returns the number of active situations impacting a top service over time",
   "display_name":"Open Situations by Top Service",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getSystemSituationStats",
   "description":"returns the number of active situations in the system over time",
   "display_name":"All Open Situations",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getStatusSituationStats",
   "description":"returns the number of active situations with specified status over time",
   "display_name":"Open Situations by Status",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "status":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getStatuses",
            "value":"status_id"
         },
         "type":"mapped",
         "required":false
      }
   }
},
{  
   "endpoint":"getSeveritySituationStats",
   "description":"returns the number of active situations with specified severity over time",
   "display_name":"Open Situations by Severity",
   "parameters":{  
      "severity":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getSeverities",
            "value":"severity_id"
         },
         "type":"mapped",
         "required":"false"
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getReoccurringSituationStats",
   "description":"returns the percentage of reoccurring situations in the system",
   "display_name":"Reoccurring situations",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getMTTAStats",
   "description":"returns the mean time to acknowledge a situation over time",
   "display_name":"Mean Time To Acknowledge",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getMTTDStats",
   "description":"returns the mean time to detect a situation over time",
   "display_name":"Mean Time To Detect",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getMTTRStats",
   "description":"returns the mean time to resolve a situation over time",
   "display_name":"Mean Time To Resolve",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getReassignedSituationStats",
   "description":"returns the number of situations that have been reassigned over time",
   "display_name":"Reassigned Situations",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getNewSituationsStats",
   "description":"returns the number of new situations over time",
   "display_name":"New Situations",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Accumulate",
               "value":"accumulate"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getNewAlertsStats",
   "description":"returns the number of new alerts over time",
   "display_name":"New Alerts",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Accumulate",
               "value":"accumulate"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getNewEventsStats",
   "description":"returns the number of new events over time",
   "display_name":"New Events",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Accumulate",
               "value":"accumulate"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getAlertsInNewSituationsStats",
   "description":"returns the number of alerts in new situations over time",
   "display_name":"Alerts In New Situations",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Accumulate",
               "value":"accumulate"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getNewEventsPerAlertsStats",
   "description":"returns the number of new events divided by the number of new alerts over time",
   "display_name":"Reduction From Events To Alert",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Accumulate",
               "value":"accumulate"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getNewAlertsPerSituationsStats",
   "description":"returns the number of new alerts divided by the number of new situations over time",
   "display_name":"Reduction From Alerts To Situations",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Accumulate",
               "value":"accumulate"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getNewEventsPerSituationsStats",
   "description":"returns the number of new events divided by the number of new situations over time",
   "display_name":"Reduction From Events To Situations",
   "parameters":{  
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Accumulate",
               "value":"accumulate"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getReassignedSituationsPerTeamStats",
   "description":"returns the number of reassigned situations of a team over time",
   "display_name":"Reassigned Situations by Team",
   "parameters":{  
      "teams":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getTeams",
            "value":"team_id"
         },
         "type":"mapped",
         "required":false
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getSeveritySituationPerTeamStats",
   "description":"returns the number of active situations with specified severity and team over time",
   "display_name":"Open Situations by Severity by Team",
   "parameters":{  
      "severity":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getSeverities",
            "value":"severity_id"
         },
         "type":"mapped",
         "required":"false"
      },
      "teams":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getTeams",
            "value":"team_id"
         },
         "type":"mapped",
         "required":false
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getStatusSituationPerTeamStats",
   "description":"returns the number of situations with a specified status and team over time",
   "display_name":"Open Situations by Status by Team",
   "parameters":{  
      "teams":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getTeams",
            "value":"team_id"
         },
         "type":"mapped",
         "required":false
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "status":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getStatuses",
            "value":"status_id"
         },
         "type":"mapped",
         "required":"false"
      }
   }
},
{  
   "endpoint":"getServiceSituationPerTeamStats",
   "description":"returns the number of active situations with specified service and team over time",
   "display_name":"Open Situations by Service by Team",
   "parameters":{  
      "teams":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getTeams",
            "value":"team_id"
         },
         "type":"mapped",
         "required":true
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "services":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getServices",
            "va* Connection #0 to host freida7 left intact 
lue":"service_id"
         },
         "type":"mapped",
         "required":"true"
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getMTTAPerTeamStats",
   "description":"returns the mean time to acknowledge a situation of a team over time",
   "display_name":"Mean Time To Acknowledge by Team",
   "parameters":{  
      "teams":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getTeams",
            "value":"team_id"
         },
         "type":"mapped",
         "required":false
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getMTTRPerTeamStats",
   "description":"returns the mean time to resolve a situation of a team over time",
   "display_name":"Mean Time To Resolve by Team",
   "parameters":{  
      "teams":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getTeams",
            "value":"team_id"
         },
         "type":"mapped",
         "required":false
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getReoccurringSituationPerTeamStats",
   "description":"returns the percentage of reoccurring situations of a team over time",
   "display_name":"Reoccurring situations Per Team",
   "parameters":{  
      "teams":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getTeams",
            "value":"team_id"
         },
         "type":"mapped",
         "required":false
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      }
   }
},
{  
   "endpoint":"getCommentCountPerTeamStats",
   "description":"returns the number of comments posted on situations by team members over time",
   "display_name":"Number of Comments by Team",
   "parameters":{  
      "teams":{  
         "mapping":{  
            "display_value":"name",
            "endpoint":"getTeams",
            "value":"team_id"
         },
         "type":"mapped",
         "required":false
      },
      "from":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
      },
      "aggregation":{  
         "default":"none",
         "type":"string",
         "static_mapping":[  
            {  
               "display_value":"None",
               "value":"none"
            },
            {  
               "display_value":"Sum",
               "value":"sum"
            }
         ],
         "required":false
      },
      "to":{  
         "description":"A timestamp from epoch in seconds",
         "type":"Long",
         "required":true
       }
     }
  }
] 
getStatusSituationStats

A GET request that returns the number of Situations by status.

Request Argument

Name

Type

Description

status

Array

An array of status ids. This is optional. If not given, it returns the default set of statuses: Opened, Unassigned, Assigned, Acknowledged, Unacknowledged, Resolved.

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

"sum" - for an aggregation of all teams provided.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the status

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 for each status.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of opened and assigned Situations from 15.27pm on Sunday, January 14th until 15.27pm on Monday, 15th January 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getStatusSituationStats" --data-urlencode 'from=1515943678' --data-urlencode 'to=1516030078' --data-urlencode 'status=[1, 2]' --data-urlencode 'aggregation=sum'

Response Example

A successful request returns the number of Situations for each status:

[{
        "datapoints": [
                [32.0, 1516008478000],
                [54.0, 1516030078000]
                [68.0, 1516030078000]
                [82.0, 1516030078000]
                [88.0, 1516030078000]
        ],
        "target": "Opened"
}, {
        "datapoints": [
                [5.0, 1515947278000],
                [12.0, 1515958078000],
                [25.0, 1515976078000],
                [31.0, 1515994078000],
                [40.0, 1516015678000]
        ],
        "target": "Assigned"
}]
getSystemSituationStats

A GET request that returns the number of active Situations in the system over time.

Request Argument

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"System"

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 for each status.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of active Situations from 11.09am on Sunday, 17th December until 11.09am on Monday, 18th December 2017:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSystemSituationStats" --data-urlencode 'from=1513508950' --data-urlencode 'to=1513595370'

Response Example

A successful response returns the number of active Situations every hour during that time range:

[{
        "datapoints": [
                [66.0, 1513657700000],
                [98.0, 1513661300000],
                [102.0, 1513664900000],
                [106.0, 1513668500000],
                [92.0, 1513672100000],
                [88.0, 1513675700000],
                [86.0, 1513679300000],
                [74.0, 1513682900000],
                [85.0, 1513672100000],
                [83.0, 1513675700000],
                [79.0, 1513679300000],
                [68.0, 1513686500000]
        ],
        "target": "Open Situations"
}]
getTopServiceSituationStats

A GET request that returns the number of active Situations impacting a top service over a range of time. Top services are the services that have the most situations impacting them.

Request Argument

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

"sum" - for an aggregation of all teams provided.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the service

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 for each status.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of Situations impacting top services between 12pm and midnight on Saturday, 15th September 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getServiceSituationStats" --data-urlencode 'from=1537012800' --data-urlencode 'to=1536969600' --data-urlencode 'aggregation=sum'

Response Example

A successful response returns the number of Situations each hour for the 12 hour range:

[{
        "datapoints": [
                [10.0, 1538133600000],
                [12.0, 1538133600000],
                [8.0, 1538133600000],
                [5.0, 1538133600000],
                [9.0, 1538133600000],
                [6.0, 1538133600000],
                [10.0, 1538133600000],
                [13.0, 1538133600000],
                [11.0, 1538133600000],
                [7.0, 1538133600000],
                [9.0, 1538133600000],
                [1.0, 1538133600000]
        ],
        "target": "Web Service"
}, {
        "datapoints": [
                [7.0, 1538133600000],
                [3.0, 1538133600000],
                [6.0, 1538133600000],
                [14.0, 1538133600000],
                [9.0, 1538133600000],
                [8.0, 1538133600000],
                [12.0, 1538133600000],
                [11.0, 1538133600000],
                [8.0, 1538133600000],
                [4.0, 1538133600000],
                [6.0, 1538133600000],
                [3.0, 1538133600000]],
        "target": "Cloud Service"
}]
Team Endpoints

The following endpoints return data statistics relating to your Moogsoft AIOps teams:

getCommentCountPerTeamStats

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

Request Arguments

Name

Type

Description

teams

Array

An array of team IDs. This is required. If no teams are provided, the endpoint does not return any data.

from

Number

Start of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

"sum" - for the sum of the number of the comments for all teams in the array.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

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.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

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"}
]
getMTTAPerTeamStats

A GET request that returns the mean time to acknowledge (MTTA) a Situation per team for a given time range.

Request Arguments

Name

Type

Description

teams

Array

An array containing a single team ID. You can only provide one team ID for this endpoint. This is mandatory. If no teams are provided, the endpoint does not return any data.

from

Number

Start of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

"sum" - for an aggregation of all MTTA times.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Mean Time to Acknowledge (MTTA)"

datapoints

Number array

An array of data points. Each data point is an array in the format [data point, timestamp]:

  1. Datapoint: MTTA (seconds) for that bucket.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

  • Less than 1 week: Returns the MTTA each hour in the time period.

  • 1 week to 1 month: Returns the MTTA each day in the time period.

  • 1 month to 1 year: Returns the MTTA each week in the time period.

  • More than 1 year: Returns the MTTA each month in the time period.

Request Example

A cURL command request to find out the MTTA for the Cloud DevOps team over a year from 13.14pm on Monday 31st July 2017 until 13.14.pm on Tuesday 31st July 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getMTTAPerTeamStats" --data-urlencode 'from=1501506840' --data-urlencode 'to=1533042840' --data-urlencode 'teams=[1]'  --data-urlencode 'aggregation=none'

Response Example

A successful response shows the MTTA for the year was 3.32 minutes:

[{
 "datapoints": [
        [213.0, 1532956486000]
 ],
 "target": "Mean Time to Acknowledge (MTTA)"
}]
getMTTRPerTeamStats

A GET request that returns the mean time to resolve (MTTR) a Situation per team for a given time range.

Request Arguments

Name

Type

Description

teams

Array

An array containing a single team ID. You can only provide one team ID for this endpoint. This is mandatory. If no teams are provided, the endpoint does not return any data.

from

Number

Start of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

aggregation

String

"sum" - for an aggregation of all MTTR times.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Mean Time to Resolve (MTTR)"

datapoints

Number array

An array of data points. Each data point is an array in the format [data point, timestamp]:

  1. Data point: MTTR (seconds) for that bucket.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

  • Less than 1 week: Returns the MTTR each hour in the time period.

  • 1 week to 1 month: Returns the MTTR each day in the time period.

  • 1 month to 1 year: Returns the MTTR each week in the time period.

  • More than 1 year: Returns the MTTR each month in the time period.

Request Example

A cURL request for the MTTR of the Cloud DevOps team from 9.26pm on Monday, November 6th until 2.26am on Tuesday, November 7th 2017:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getMTTRPerTeamStats" --data-urlencode 'teams=[1]'  --data-urlencode 'from=1510003600' --data-urlencode 'to=1510021600' --data-urlencode 'aggregation=none'

Response Example

A successful response returns the MTTR each hour from 9.26pm until 2.26am:

[{
        "datapoints": [
                [101.6,1510003600000],
                [180.0,1510007200000],
                [210.6667,1510010800000],
                [85.7083,1510014400000],
                [302.5,1510018000000],
                [150.4286,1510021600000]]
        ],
        "target": "Mean Time to Resolve (MTTR)"
}]
getReassignedSituationsPerTeamStats

A GET request that returns the number of reassigned Situations associated with a team or multiple teams over a given time range. A reassigned Situation is a Situation that a user has assigned to another user at least twice.

Request Arguments

Name

Type

Description

teams

Array

An array of team IDs. This is required. If no teams are provided, the endpoint does not return any data.

from

Number

Start of the time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

End of the time range you want to collect data from. This is a Unix epoch timestamp in seconds.

aggregation

String

"sum" - for an aggregation of all Situations.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the team: "<team_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 reassigned Situations.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the reassigned Situations for the Cloud DevOps and Application Performance Monitoring teams from August 1st until September 1st 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getReassignedSituationsPerTeamStats" --data-urlencode 'teams=[1,2]' --data-urlencode 'from=1533103200' --data-urlencode 'to=1535781600'

Response Example

A successful response returns the number of reassigned Situations for each week during that month range for both teams:

[{
    "datapoints":[
                [4.9702,1533103200000],
                [4.9881,1533708000000],
                [5.0655,1534312800000],
                [4.9524,1534917600000],
                [4.9917,1535522400000]],
    "target":"Cloud DevOps"
 },
 {
    "datapoints":[
                [5.006,1533103200000],
                [5.0,1533708000000],
                [5.131,1534312800000],
                [5.0714,1534917600000],
                [4.8417,1535522400000]],
    "target":"Application Performance Monitoring"
 }]
getReoccurringSituationPerTeamStats

A GET request that returns the number of reoccurring Situations associated with a team for a given time range.

Request Argument

Name

Type

Description

teams

Array

An array of team IDs. This is required. If no teams are provided, the endpoint does not return any data.

from

Number

Start of the time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

End of the time range you want to collect data from. This is a Unix epoch timestamp in seconds.

aggregation

String

"sum" - for an aggregation of all Situations.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Reoccurring situations"

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 reoccurring Situations.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of reoccuring Situations from 3pm on Saturday, September 1st until 3pm on Saturday, September 8th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getReoccurringSituationPerTeamStats" --data-urlencode 'teams=[1,2]' --data-urlencode 'from=1535814000' --data-urlencode 'to=1536418800' --data-urlencode 'aggregation=none'

Response Example

A successful response indicates there were four reoccuring Situations at the time the request was sent:

[{"datapoints":[[4.0,1538044321144]],"target":"Reoccurring situations"}]
getServiceSituationPerTeamStats

A GET request that returns the number of Situations impacting each service for a team.

Request Argument

Name

Type

Description

teams

Array

A single team ID in an array. You can only provide one team ID for this endpoint. This is required. If no teams are provided, the endpoint does not return any data.

from

Number

Start of the time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

End of the time range you want to collect data from. This is a Unix epoch timestamp in seconds.

aggregation

String

"sum" - for an aggregation of all services.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The 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 Situations impacting services.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of Situations associated with the Cloud DevOps team that are impacting the Commerce and Compute services between 12pm and 6pm on Friday, August 10th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getServiceSituationPerTeamStats" --data-urlencode 'from=1533902400' --data-urlencode 'to=1533924000' --data-urlencode 'teams=[1]' --data-urlencode 'services=[1, 2]' --data-urlencode 'aggregation=none'

Response Example

A successful request returns the number of Situations impacting the services each hour during the six hour time range:

[{
        "datapoints":[
                [7.0,1533902400000],
                [18.0,1533906000000],
                [18.0,1533909600000],
                [13.0,1533913200000],
                [9.0,1533916800000],
                [12.0,1533920400000]],
        "target":"Commerce"},
{
        "datapoints":[
                [14.0,1533902400000],
                [15.0,1533906000000],
                [6.0,1533909600000],
                [12.0,1533913200000],
                [1.0,1533916800000],
                [11.0,1533920400000]],
        "target":"Compute"
}]
getSeveritySituationPerTeamStats

A GET request that returns the number of Situations by severity per team for a given time range.

Request Argument

Name

Type

Description

teams

Array

A single team ID in an array. You can only provide one team ID for this endpoint. This is required. If no teams are provided, the endpoint does not return any data.

severity

Array

An array of severity IDs. This is optional. If not given, it returns default set of severities: Clear, Indeterminate, Warning, Minor, Major, Critical.

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last data point returned is the current state datapoint.

aggregation

String

"sum" - for an aggregation of all teams provided.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the status.

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 per severity.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of clear Situations for the Cloud DevOps team between between 12pm onThursday, August 9th and 12pm on Friday, August 10th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSeveritySituationPerTeamStats" --data-urlencode 'from=1533816000' --data-urlencode 'to=1533902400' --data-urlencode 'teams=[1]' --data-urlencode 'severity=[0]' --data-urlencode 'aggregation=none' 

Response Example

A successful response returns the number of clear Situations each hour over the past 24 hours:

[{
        "datapoints":[
                [13.0,1533816000000],
                [14.0,1533819600000],
                [6.0,1533823200000],
                [10.0,1533826800000],
                [14.0,1533830400000],
                [5.0,1533834000000],
                [19.0,1533837600000],
                [17.0,1533841200000],
                [4.0,1533844800000],
                [13.0,1533848400000],
                [7.0,1533852000000],
                [15.0,1533855600000],
                [6.0,1533859200000],
                [10.0,1533862800000],
                [16.0,1533866400000],
                [20.0,1533870000000],
                [19.0,1533873600000],
                [15.0,1533877200000],
                [15.0,1533880800000],
                [5.0,1533884400000],
                [20.0,1533888000000],
                [3.0,1533891600000],
                [1.0,1533895200000],
                [4.0,1533898800000]],
        "target":"Clear"
}]
getStatusSituationPerTeamStats

A GET request that returns the number of Situations by status for a team over a given time range.

Request Argument

Name

Type

Description

teams

Array

A single team ID in an array. You can only provide one team ID for this endpoint. This is required. If no teams are provided, the endpoint does not return any data.

status

Array

An array of status IDs. Valid status IDs are 1 (opened), 3 (assigned), 4 (acknowledged), 5 (unacknowledged) and 8 (resolved). Other integers do not return any data.

If left empty, the request returns the number of Situations for all statuses.

from

Number

Start of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

aggregation

String

"sum" - for an aggregation of all teams provided.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The 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 Situations for each status.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request with to return all Situations by status for the Cloud DevOps team from 8.30am until 2.30pm on Saturday, September 1st 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getStatusSituationPerTeamStats" --data-urlencode 'from=1535790600' --data-urlencode 'to=1535812200' --data-urlencode 'teams=[1]' --data-urlencode 'status=[]' --data-urlencode 'aggregation=none'

Response Example

A successful response returns the number of Situations by status each hour for the six hour range:

[
        {"datapoints":[
                [19.0,1535790600000],
                [20.0,1535794200000],
                [17.0,1535797800000],
                [18.0,1535801400000],
                [17.0,1535805000000],
                [17.0,1535808600000]],
                "target":"Opened"},
        {"datapoints":[
                [3.0,1535790600000],
                [7.0,1535794200000],
                [4.0,1535797800000],
                [10.0,1535801400000],
                [10.0,1535805000000],
                [2.0,1535808600000]],
                "target":"Assigned"},
        {"datapoints":[
                [3.0,1535790600000],
                [5.0,1535794200000],
                [10.0,1535797800000],
                [3.0,1535801400000],
                [5.0,1535805000000],
                [2.0,1535808600000]],
                "target":"Acknowledged"},
        {"datapoints":[
                [3.0,1535790600000],
                [3.0,1535794200000],
                [4.0,1535797800000],
                [3.0,1535801400000],
                [3.0,1535805000000],
                [2.0,1535808600000]],
                "target":"Unacknowledged"},
        {"datapoints":[
                [46.0,1535790600000],
                [48.0,1535794200000],
                [32.0,1535797800000],
                [48.0,1535801400000],
                [34.0,1535805000000],
                [36.0,1535808600000]],
                "target":"Resolved"}
]
getTeamSituationStats

A GET request that returns the number of active Situations assigned to a team for a given time range.

Request Argument

Name

Type

Description

teams

Array

An array of team IDs. This is optional. If no teams are provided, the endpoint does not return any data.

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

"sum" - for an aggregation of all teams provided.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The 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 Situations for each status.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to return the number of active Situations assigned to the Cloud DevOps and Application Performance Monitoring teams from midnight until 6am on Monday, 20th August 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getTeamSituationStats" --data-urlencode 'teams=[1,2]' --data-urlencode 'from=1534723200' --data-urlencode 'to=1534744800' --data-urlencode 'aggregation=none'

Response Example

A successful response returns the number of Situations assigned each hour to each team for the six hour range:

[
        {"datapoints":[
                [30.0,1534723200000],
                [20.0,1534726800000],
                [24.0,1534730400000],
                [19.0,1534734000000],
                [28.0,1534737600000],
                [23.0,1534741200000]],
                "target":"Cloud DevOps"},
        {"datapoints":[
                [26.0,1534723200000],
                [29.0,1534726800000],
                [15.0,1534730400000],
                [29.0,1534734000000],
                [25.0,1534737600000],
                [22.0,1534741200000]],
                "target":"Application Performance Monitoring"}]
getTopTeamSituationStats

A GET request that returns the number of active Situations assign to top teams over a given range of time. Top teams are those teams with the highest number of assigned Situations.

Request Argument

Name

Type

Description

from

Number

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

"sum" - for an aggregation of all teams provided.

"none" - for no aggregation of results.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The 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 Situations for each status.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the number of Situations impacting top teams between 6am and 12pm onWednesday, 1st August 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getTeamSituationStats"  --data-urlencode 'from=1533103200' --data-urlencode 'to=1533124800' --data-urlencode 'aggregation=sum'

Response Example

A successful response returns the number of Situations per hour for the six hour time time range:

[{
        "datapoints": [
                [2.0, 1538133780000],
                [9.0, 1538133780000],
                [5.0, 1538133780000],
                [4.0, 1538133780000],
                [3.0, 1538133780000],
                [1.0, 1538133780000]
        ],
        "target": "Cloud DevOps"
}, {
        "datapoints": [
                [8.0, 1538133780000],
                [2.0, 1538133780000],
                [6.0, 1538133780000],
                [7.0, 1538133780000],
                [5.0, 1538133780000],
                [3.0, 1538133780000]
        ],
        "target": "Application Performance Monitoring"
}]
User Endpoints

The following endpoints return data statistics relating to your Moogsoft AIOps users:

getAlertsMarkedPRCPerUserStats

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

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

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.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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)"
}]
getAcknowledgedSituationsPerUserStats

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

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

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.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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)"
}]
getAssignedSituationsPerUserStats

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

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Assigned 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 assigned to the user.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to return the number of Situations assigned to users 10 and 11 from 11pm on Tuesday, 25th September 2018 until 11pm on Wednesday, 26th September 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getAssignedSituationsPerUserStats" --data-urlencode 'users=[10,11]' --data-urlencode 'from=1537916400' --data-urlencode 'to=1538002799' --data-urlencode 'aggregation=sum'

Response Example

A successful response returns the number of Situations assigned to the users Frank and Dave each hour during the time range:

[{
        "datapoints":[
                [10.0,1537916400000],
                [5.0,1537920000000],
                [7.0,1537923600000],
                [7.0,1537927200000],
                [7.0,1537930800000],
                [1.0,1537934400000],
                [5.0,1537938000000],
                [6.0,1537941600000],
                [9.0,1537945200000],
                [9.0,1537948800000],
                [7.0,1537952400000],
                [8.0,1537956000000]
        ],
        "target":"Assigned Situations (Frank Fuller/Dave Danton)"
}]
getChatOpsToolExecutedPerUserStats

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

Request Arguments

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

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.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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)"
}]
getClosedSituationsPerUserStats

A GET request that returns the number of Situations that a user has closed each hour within a given time range.

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Closed 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 closed by the user.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to return the number of Situations closed by user 12 from 6am until midnight on October 1st 2018:

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

Response Example

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

[{
        "datapoints":[
                [1.0,1539558000000],
                [1.0,1539561600000],
                [2.0,1539565200000],
                [5.0,1539568800000],
                [0.0,1539572400000],
                [7.0,1539576000000],
                [1.0,1539579600000],
                [0.0,1539583200000],
                [8.0,1539586800000],
                [6.0,1539590400000],
                [0.0,1539594000000],
                [0.0,1539597600000]
        ],
        "target":"Closed Situations (Chris Collins)"
}]
getCommentCountPerUserStats

A GET request that returns the number of comments left by a user or users within a given time range.

Request Arguments

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Number of Comments (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 comments.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to retrieve the total number of comments made by user 9 and 11 each hour from 11pm on Sunday, 14th October until 11pm on Monday, 15th October 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getCommentsPerUserStats" --data-urlencode 'users=[9,11]' --data-urlencode 'from=1539558000' --data-urlencode 'to=1539644399' --data-urlencode 'aggregation=sum'

Response Example

A successful response returns the number of comments made by the users Ian and Sharon 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":"Number of Comments (Ian Ince/Sharon Scott)"
}]
getInvitationsReceivedPerUserStats

A GET request that returns the number of Situation invitations received for a given user each hour within a given time range.

Request Arguments

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Invitations Received (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: Invitations received by the user.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request for the number of Situation invitations for users 7 and 8 from midnight on Sunday, 14th October until 6am on Monday, 15th October 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getInvitationsReceivedPerUserStats" --data-urlencode 'users=[7,8]' --data-urlencode 'from=1539558000' --data-urlencode 'to=1539583200' --data-urlencode 'aggregation=none'

Response Example

A successful response returns the number of invitations for users 7 and 8:

[{
        "datapoints": [
                [1.0,1539558000000],
                [1.0,1539561600000],
                [2.0,1539565200000],
                [5.0,1539568800000],
                [0.0,1539572400000],
                [7.0,1539576000000],
                [1.0,1539579600000],
                [0.0,1539583200000],
                [8.0,1539586800000],
                [1.0,1539579600000],
                [2.0,1539583200000],
                [0.0,1539586800000],
        ],
        "target": "Invitations Received (Peter Parker/Kat Knight)"
}]
getMTTAPerUserStats

A GET request that returns the mean time it takes a user to acknowledge a Situation within a given time range.

Request Arguments

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Mean Time to Acknowledge (MTTA) (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: MTTA (seconds) for that bucket.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

  • Less than 1 week: Returns the MTTA each hour in the time period.

  • 1 week to 1 month: Returns the MTTA each day for in time period.

  • 1 month to 1 year: Returns the MTTA each week in the time period.

  • More than 1 year: Returns the MTTA each month in the time period.

Request Example

A cURL request for the MTTA for user 5 from 6.34am until 2.35pm on Tuesday, 25th September 2018:

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

Response Example

A successful response returns the MTTA each hour for the user Robert:

[{
        "datapoints": [
                [221,1537857295000],
                [960,1537860895000], 
                [901,1537864495000], 
                [1196,1537868095000], 
                [671,1537871695000], 
                [1241,1537875295000], 
                [556,1537878895000]
        ],
        "target": "Mean Time to Acknowledge (MTTA)(Robert Richards)"
}]
getMTTRPerUserStats

A GET request that returns the mean time it takes a user to resolve a Situation within a given time range.

Request Arguments

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range you want to collect data from. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Mean Time to Resolve (MTTR) (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: MTTR (seconds) for that bucket.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

  • Less than 1 week: Returns the MTTR each hour in the time period.

  • 1 week to 1 month: Returns the MTTR each day in the time period.

  • 1 month to 1 year: Returns the MTTR each week in the time period.

  • More than 1 year: Returns the MTTR each month in the time period.

Request Example

A cURL request for the MTTR for user 5 from 11pm on Monday, 1st October until 5am on Tuesday, 2nd October 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getMTTRPerUserStats" --data-urlencode 'user=[5]' --data-urlencode 'from=1538434800' --data-urlencode 'to=1538456400' --data-urlencode 'aggregation=none'

Response Example

A successful response returns the MTTR each hour:

[{
        "datapoints": [
                [12997.0,1538434800000],
                [14025.0,1538438400000],
                [2969.0,1538442000000],
                [13125.0,1538445600000],
                [11412.0,1538449200000],
                [8264.0,1538452800000]
        ],
        "target": "Mean Time to Resolve (MTTR)(Oscar O'Neill)"
}]
getOpenSituationsPerUserStats

A GET request that returns the number of open Situations assigned to a user at each data point.

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Open 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 open Situations assigned to the user.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to return the number of open Situations assigned to user 6 from 9.19am on Monday, 17th September until 16.19am on Monday, 17th September 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getOpenSituationsPerUserStats" --data-urlencode 'users=[6,7]' --data-urlencode 'from=1537175946' --data-urlencode 'to=1537201140' --data-urlencode 'aggregation=none'

Response Example

A successful response returns the number of open Situations assigned to the users Oscar and Olivia each hour during the time range:

[{
        "datapoints":[
                [12.0,1537175946000],
                [8.875,1537262346000],
                [10.0,1537348746000],
                [8.9,1537435146000],
                [10.75,1537521546000],
                [9.25,1537607946000],
                [8.1667,1537694346000]
        ],
        "target":"Open Situations (Oscar O'Neill)"
},
{
        "datapoints":[
                [4.0,1537175946000],
                [5.0,1537262346000],
                [12.0,1537348746000],
                [7.0,1537435146000],
                [3.0,1537521546000],
                [9.0,1537607946000],
                [8.0,1537694346000]
        ],
        "target":"Open Situations (Andrew Anderson)"
}
]
getRatedSituationsPerUserStats

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

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Rated 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 rated by the user.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to return the number of Situations rated by users 5 and 7 from 3:57am until 9:57am on Thursday, October 5th 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getRatedSituationsPerUserStats" --data-urlencode 'users=[5,7]' --data-urlencode 'from=1538621843' --data-urlencode 'to=1538643443'

Response Example

A successful response returns the number of Situations rated by the users Steve and Charlie each hour during the time range:

[{
        "datapoints":[
                [6.0,1538621843000],    
                [1.0,1538625443000],
                [6.0,1538629043000],
                [5.0,1538632643000],
                [2.0,1538636243000],
                [5.0,1538639843000]
        ],
        "target":"Rated Situations (Steve Smith)"
  },
  {
        "datapoints":[
                [0.0,1538621843000],
                [3.0,1538625443000],
                [1.0,1538629043000],
                [6.0,1538632643000],
                [6.0,1538636243000],
                [8.0,1538639843000]
        ],
        "target":"Rated Situations (Charlie Copper)"
}]
getReassignedSituationsPerUserStats

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

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Reassigned 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 reassigned by the user.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to return the number of Situations reassigned by user 5 from 11pm on Sunday, 14th October until 5am on Monday, 15th October 2018:

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

Response Example

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

[{
        "datapoints":[
                [2.0,1539558000000],
                [3.0,1539561600000],
                [0.0,1539565200000],
                [1.0,1539568800000],
                [0.0,1539572400000],
                [3.0,1539576000000],
        ],
        "target":"Reassigned Situations (Dave Danton)"
}]
getResolvedSituationsPerUserStats

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

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

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.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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)"
}]
getViewedSituationsPerUserStats

A GET request that returns the number of Situations a user has viewed within a given time range. Moogsoft AIOps considers a user to have viewed a Situation if they opened the Situation Room.

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Viewed 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 viewed by the user.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to return the number of viewed Situations by user 7 from 9am until 3pm on Thursday, 20th September 2018:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getViewedSituationsPerUserStats" --data-urlencode 'users=[7]' --data-urlencode 'from=1537434000' --data-urlencode 'to=1537455600' --data-urlencode 'aggregation=none'

Response Example

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

[{
        "datapoints":[
                [16.0,1537434000000],
                [26.0,1537437600000],
                [18.0,1537441200000],
                [34.0,1537444800000],
                [18.0,1537448400000],
                [11.0,1537452000000]
        ],
        "target":"Viewed Situations (Charlie Cooper)"
}]
getWorkedSituationsPerUserStats

A GET request that returns the number of Situations a user has worked on within a given time range.

Moogsoft AIOps considers a user to have worked on a Situation if any of the following apply:

  • User has been assigned a Situation.

  • User has been invited to a Situation.

  • User has a left a comment on a Situation.

  • User has closed a Situation.

  • User has resolved a Situation.

  • User has executed a ChatOps tool on a Situation.

  • User has rated a Situation.

  • User has added PRC data to alerts in a Situation.

Request Argument

Name

Type

Required

Description

users

Array

Yes

An array of user IDs. If no users are provided, the endpoint does not return any data.

from

Number

Yes

Start of the reporting time range. This is a Unix epoch timestamp in seconds.

to

Number

Yes

End of the reporting time range. This is a Unix epoch timestamp in seconds.

If this timestamp is within 10 seconds of the current system time, the last datapoint returned is the current state datapoint.

aggregation

String

No

"sum" - adds data points together.

"none" - no aggregation of data points. Defaults to "none" if you provide no aggregation option.

Response

Type

Description

HTTP code

HTTP status or error code indicating request success or failure. See HTTP Status and Error Codes for details.

Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Worked 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 worked on by the user.

  2. Timestamp: Calculation time (Unix epoch timestamp in milliseconds).

The time range you provide determines the number of data points per time unit the request returns. For example:

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

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

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

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

Request Example

A cURL request to return the number of Situations worked on by user 5 from 12:22pm on Thursday 30th August until 8:22am Friday 31st August 2018:

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

Response Example

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

[{
        "datapoints":[
                [12.0,1535628143000],
                [25.0,1535631743000],
                [33.0,1535635343000],
                [14.0,1535638943000],
                [1.0,1535642543000],
                [4.0,1535646143000],
                [9.0,1535649743000],
                [6.0,1535653343000],
                [37.0,1535656943000],
                [31.0,1535660543000],
                [19.0,1535664143000],
                [35.0,1535667743000],
                [36.0,1535671343000],
                [28.0,1535674943000],
                [30.0,1535678543000],
                [19.0,1535682143000],
                [21.0,1535685743000],
                [30.0,1535689343000],
                [35.0,1535692943000],
                [30.0,1535696543000]
        ],
        "target":"Worked Situations (Chris Cole)"
}]
HTTP Status and Error Codes

The Graze API returns the following HTTP status and error codes for successful and unsuccessful requests:

HTTP Code

Meaning

200

Successful request.

400

Incorrectly formatted request.

401

A request with an invalid or expired auth_code.

403

Forbidden request.

404

Not found, for example, the sitn_id could not be found because it does not exist.

500

Failed request, for example, due to an invalid sitn_id.