Moogsoft Docs

Stats API

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

These endpoints return 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).

Endpoints

getNewAlertsStats

getNewAlertsStats

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

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.
aggregation String "accumulate" - gradually adds data points together over time.
"none" - no aggregation of data points.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Alerts"

datapoints

Number array

An array of multiple nested arrays containing the number of alerts and a timestamp.


Input Example

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


Output Example

Successful request return:

[
	{"datapoints":[
	[22.0,1523438216685]
	],
	"target":"New Alerts"}
]
getNewEventsStats

getNewEventsStats

A GET request that returns the number of new events over a given time period.

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.
aggregation String "accumulate" - gradually adds data points together over time.
"none" - no aggregation of data points.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Events"

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[
	{"datapoints":[
	[22.0,1523438216685]
	],
	"target":"New Events"}
]
getNewAlertsPerSituationsStats

getNewAlertsPerSituationsStats

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

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Alerts per Situation"

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

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

getNewEventsPerAlertsStats

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

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Events per Alerts"

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

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

getNewEventsPerSituationsStats

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

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Events per Situation"

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[
	{"datapoints":[
	[22.0,1523438216685]
	],
	"target":"New Events per Situation"}
]
getAlertsInNewSituations

getAlertsInNewSituationsStats

A GET request that returns the alerts contained in new Situations over a given time period.

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.
aggregation String "accumulate" - gradually adds data points together over time.
"none" - no aggregation of data points.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Alerts in new situations"

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[
	{"datapoints":[
	[22.0,1523438216685]
	],
	"target":"Alerts in new situations"}
]
getNewSituationsStats

getNewSituationsStats

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

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"New Situations"

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[
	{"datapoints":[
	[22.0,1523438216685]
	],
	"target":"New situations"}
]
getTeamSituationStats

getTeamSituationStats

A GET request that returns the number of active Situations that are assigned to a team.

Request Argument

Name

Type

Description

teams

Array

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

from
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.
aggregation
String

"sum" - for an aggregation of all teams provided.
"none" - for no aggregation of results.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the team .

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value)


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "Cloud DevOps"
}, {
	"datapoints": [],
	"target": "Database"
}]
getTopTeamSituationStats

getTopTeamSituationStats

A GET request that returns the number of active Situations assign to Top teams (teams having the most situations assigned to them) over time.

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.
aggregation
String "sum" - for an aggregation of all teams provided.
"none" - for no aggregation of results.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the team.

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "Cloud DevOps"
}, {
	"datapoints": [],
	"target": "Database"
}]
getSystemSituationStats

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 window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"System"

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "Open Situations"
}]
getMTTRStats

getMTTRStats

A GET request that returns the Mean Time To Resolve (MTTR) situations in the system over time. The TTR for a situation is the duration from the first event in the situation (start) to the time when a user resolved the situation in AIOps (end).

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number

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

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


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"mtt_resolve" – ID string for the target endpoint

datapoints

Number array

An array of datapoints. This call divides the reporting time window into buckets and reports the MTTR for each bucket. Each datapoint is an array in the format [datapoint, timestamp]:

  1. datapoint – MTTR (seconds) for that bucket
  2. timestamp – calculation time (UNIX epoch timestamp in milliseconds)

The reporting time window size determines the frequency and bucket size for individual MTTR datapoints:

  • Less than 1 week – MTTR for the past hour
  • 1 week to 1 month – MTTR for the past day
  • 1 month to 1 year – MTTR for the past week
  • More than 1 year – MTTR for the past month


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "mtt_resolve"
}]
getMTTDStats

getMTTDStats

A GET request that returns the Mean Time To Detect (MTTD) situations in the system over time. The TTD for a situation is the duration from the first event in the situation (start) to the situation creation time (end).

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number

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

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


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"mtt_detect" ID string for the target endpoint

datapoints

Number array

An array of datapoints. This call divides the reporting time window into buckets and returns the MTTD for each bucket. Each datapoint is an array in the format [datapoint, timestamp]:

  1. datapoint – MTTD (seconds) for that bucket
  2. timestamp – calculation time (UNIX epoch timestamp in milliseconds)

The reporting time window size determines the frequency and bucket size for individual MTTD datapoints:

  • Less than 1 week – MTTD for the past hour
  • 1 week to 1 month – MTTD for the past day
  • 1 month to 1 year – MTTD for the past week
  • More than 1 year – MTTD for the past month


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "mtt_detect"
}]
getMTTAStats

getMTTAStats

A GET r equest that returns Mean Time To Acknowledge (MTTA) situations in the system over time. The TTA for a situation is the duration from the first event in the situation (start) to the time when the situation gets assigned to a user in AIOps (end) .

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number

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

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


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"mtt_acknowledge"

datapoints

Number array

An array of datapoints. This call divides the reporting time window into buckets and returns the MTTA for each bucket. Each datapoint is an array in the format [datapoint, timestamp]:

  1. datapoint – MTTA (seconds) for that bucket
  2. timestamp – calculation time (UNIX epoch timestamp in milliseconds)

The reporting time window size determines the frequency and bucket size for individual MTTA datapoints:

  • Less than 1 week – MTTA for the past hour
  • 1 week to 1 month – MTTA for the past day
  • 1 month to 1 year – MTTA for the past week
  • More than 1 year – MTTA for the past month


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "mtt_acknowledge"
}]
getReoccurringSituationStats

getReoccurringSituationStats

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

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Reoccurring Situation"

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "Reoccurring Situation"
}]
getReassignedSituationStats

getReassignedSituationStats

A GET request that returns the number of situations reassigned in the system over time.

Request Argument

Name

Type

Description

from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

"Reassigned Situation"

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "Reassigned Situation"
}]
getServiceSituationStats

getServiceSituationStats

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

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 reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.
aggregation
String "sum" - for an aggregation of all teams provided.
"none" - for no aggregation of results.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the service.

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "Service A"
}, {
	"datapoints": [],
	"target": "Service B"
}]
getTopServiceSituationStats

getTopServiceSituationStats

A GET request that returns the number of active Situations impacting a Top service (services having the most situations impacting them) over time.

Request Argument

Name

Type

Description

from
Number A timestamp of the Unix epoch time in seconds from when the data points are collected. This is a Unix epoch timestamp in seconds.
to
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
aggregation
String "sum" - for an aggregation of all teams provided.
"none" - for no aggregation of results.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the service

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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


Output Example

Successful request return:

[{
	"datapoints": [
		[2.0, 1513657700000],
		[9.0, 1513661300000],
		[1.0, 1513664900000],
		[4.0, 1513668500000],
		[3.0, 1513672100000],
		[2.0, 1513675700000],
		[2.0, 1513679300000],
		[9.0, 1513682900000],
		[1.0, 1513686500000]
	],
	"target": "Service A"
}, {
	"datapoints": [],
	"target": "Service B"
}]
getStatusSituationStats

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, Acknowledeged, Unacknowledeged, Resolved.
from
Number Start of the reporting time window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.
aggregation
String "sum" - for an aggregation of all teams provided.
"none" - for no aggregation of results.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the status

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

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'


Output Example

Successful request return:

[{
	"datapoints": [
		[92.0, 1516008478000],
		[666.0, 1516030078000]
	],
	"target": "Opened"
}, {
	"datapoints": [
		[1.0, 1515947278000],
		[35.0, 1515958078000],
		[63.0, 1515976078000],
		[241.0, 1515994078000],
		[4.0, 1516015678000]
	],
	"target": "Assigned"
}]
getSeveritySituationStats

getSeveritySituationStats

A GET request that returns the number of situations by severity.

Request Argument

Name

Type

Description

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 window. This is a Unix epoch timestamp in seconds.
to
Number A timestamp of the Unix epoch time in seconds from when the data points are collected.
aggregation
String "sum" - for an aggregation of all teams provided.
"none" - for no aggregation of results.


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Successful requests return a JSON object containing the following:

Name

Type

Description

target

String

The name of the status.

datapoints

Number array

An array containing multiple nested arrays of data points (timestamp + value).


Input Example

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSeveritySituationStats" --data-urlencode 'from=1516216020' --data-urlencode 'to=1516282420' --data-urlencode 'severity=[0, 1]' --data-urlencode 'aggregation=sum'


Output Example

Successful request return:

[{
	"datapoints": [
		[92.0, 1516008478000],
		[666.0, 1516030078000]
	],
	"target": "Major"
}, {
	"datapoints": [
		[1.0, 1515947278000],
		[35.0, 1515958078000],
		[63.0, 1515976078000],
		[241.0, 1515994078000],
		[4.0, 1516015678000]
	],
	"target": "Minor"
}]
getStats

getStats

A GET request that list all endpoints available with their description.

No Requested Arguments


Return Parameters

Type

Description

HTTP code

HTTP status or error code indicating request success or failure.


Input Example

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


Output Example

Successful request return:

[
    {
        "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": "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
            }
        }
    }
]