Metrics API

View metrics aggregated by API Monitoring. For more information, see View metrics data using the API.

Resource Types

URIs are relative to https://apimonitoring.enterprise.apigee.com/metrics, unless otherwise noted.

Condition

For more information, see Condition.
No methods use this type.

Dimension

For more information, see Dimension.
No methods use this type.

Error

For more information, see Error.
MethodEndpointDescription
get/alerthistory

Gets alert history metrics for a specific organization and time interval.

The maximum duration of the time interval is seven days, meaning you can view alerts only for the past seven days. By default, the API returns alerts for the previous one hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Notes: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/alertinstance/{instance_id}

Gets information about a triggered alert for an organization.

Use the Get alert history API (/alerthistory) to return information about triggered alerts, including alert IDs, for an organization.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/alertsummary

Gets the total count of alerts for an organization and time interval.

By default, the API returns alerts for the previous hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/events

Gets all events in an organization for a specified time interval. The list of events includes anomalies detected by Edge and any triggered alerts. The alerts can include both fixed and anomaly alerts.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute. For more information and examples of this API, see View metrics data using the API.

get/faultcodecategories

Lists available fault code categories.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/faultcodedetails

Lists available fault codes with details.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/faultcodenames

Lists fault code names.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/faultcodes

Lists available fault codes.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see [View metrics data using the API](https://docs.apigee.com/api-monitoring/metrics

get/faultcodesubcategories

Lists available fault code subcategories.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/latency

Gets latency metrics for requests to Edge and to backend targets. Specify filters such as proxy name, interval, target, status code, and many others.

For this API:

  • You must specify the percentile query parameter as 50, 90, 95, or 99. For example, if you specify 90, the API returns the total response latency value in the 90th percentile.

Setting interval

The interval query parameter defines the update interval for the value in the results, where:

  • interval specifies the frequency that the metric is saved to the results. Must be set to multiples of 60 seconds, with a minimum value of 60 seconds and a maximum value of 300 seconds (5 minutes).

The interval query parameter value supports the following format:

  • <value><unit> where:
    • <value> – an integer
    • <unit> – a time unit of: u, ms, s, sec, m, h, d, w

For example:

  • 1u
  • 2s
  • 5m

Setting to and from

By default, the API returns alerts for the previous hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/targets

Lists target domains for a specific organization and environment.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/traffic

Gets traffic metrics. Specify filters such as proxy name, interval, time window, target, status code, and many others.

Setting groupBy and env

The groupBy query parameter specifies how to aggregate metrics. The env query parameter filters results by a specific environment name. You must specify either groupBy to include the env option or specify an environment name using the env query parameter. For example:


groupBy=env // env query param is empty

or:


env=envName // groupBy query param is empty; envName is the name of the env

You can specify both query params. For example, the following settings aggregate metrics by environment, region, and organization and filters the results for the environment named prod:


groupBy=env,region,org&env=prod

Setting interval

The interval query parameter specifies the frequency that the metric is saved to the results. Each data point in the metric results is calculated over the preceding interval of time.

For example, if interval is 10 minutes, then the metric is calcluated over the previous 10 minutes, and written to the results every 10 minutes.

The interval query parameter value supports the following format:

  • <value><unit> where:
    • <value> – an integer
    • <unit> – a time unit of: u, ms, s, sec, m, h, d, w

For example:

  • 1m
  • 10h
  • 2d

Setting to and from

By default, the API returns alerts for the previousz hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)

  • -<value><unit> specifes a time in the past (note the leading hyphen):

    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:

    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

Event

For more information, see Event.
MethodEndpointDescription
get/alerthistory

Gets alert history metrics for a specific organization and time interval.

The maximum duration of the time interval is seven days, meaning you can view alerts only for the past seven days. By default, the API returns alerts for the previous one hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Notes: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/alertinstance/{instance_id}

Gets information about a triggered alert for an organization.

Use the Get alert history API (/alerthistory) to return information about triggered alerts, including alert IDs, for an organization.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/events

Gets all events in an organization for a specified time interval. The list of events includes anomalies detected by Edge and any triggered alerts. The alerts can include both fixed and anomaly alerts.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute. For more information and examples of this API, see View metrics data using the API.

Events

For more information, see Events.
MethodEndpointDescription
get/alerthistory

Gets alert history metrics for a specific organization and time interval.

The maximum duration of the time interval is seven days, meaning you can view alerts only for the past seven days. By default, the API returns alerts for the previous one hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Notes: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/events

Gets all events in an organization for a specified time interval. The list of events includes anomalies detected by Edge and any triggered alerts. The alerts can include both fixed and anomaly alerts.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute. For more information and examples of this API, see View metrics data using the API.

FaultCodeCategories

For more information, see FaultCodeCategories.
MethodEndpointDescription
get/faultcodecategories

Lists available fault code categories.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

FaultCodeDetail

For more information, see FaultCodeDetail.
MethodEndpointDescription
get/faultcodedetails

Lists available fault codes with details.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

FaultCodeNames

For more information, see FaultCodeNames.
MethodEndpointDescription
get/faultcodenames

Lists fault code names.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

FaultCodeSubCategories

For more information, see FaultCodeSubCategories.
MethodEndpointDescription
get/faultcodesubcategories

Lists available fault code subcategories.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

FaultCodes

For more information, see FaultCodes.
MethodEndpointDescription
get/faultcodes

Lists available fault codes.

Note: You can call this API at most six times per minute.

For more information and examples of this API, see [View metrics data using the API](https://docs.apigee.com/api-monitoring/metrics

MetricsResponse

For more information, see MetricsResponse.
MethodEndpointDescription
get/latency

Gets latency metrics for requests to Edge and to backend targets. Specify filters such as proxy name, interval, target, status code, and many others.

For this API:

  • You must specify the percentile query parameter as 50, 90, 95, or 99. For example, if you specify 90, the API returns the total response latency value in the 90th percentile.

Setting interval

The interval query parameter defines the update interval for the value in the results, where:

  • interval specifies the frequency that the metric is saved to the results. Must be set to multiples of 60 seconds, with a minimum value of 60 seconds and a maximum value of 300 seconds (5 minutes).

The interval query parameter value supports the following format:

  • <value><unit> where:
    • <value> – an integer
    • <unit> – a time unit of: u, ms, s, sec, m, h, d, w

For example:

  • 1u
  • 2s
  • 5m

Setting to and from

By default, the API returns alerts for the previous hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/traffic

Gets traffic metrics. Specify filters such as proxy name, interval, time window, target, status code, and many others.

Setting groupBy and env

The groupBy query parameter specifies how to aggregate metrics. The env query parameter filters results by a specific environment name. You must specify either groupBy to include the env option or specify an environment name using the env query parameter. For example:


groupBy=env // env query param is empty

or:


env=envName // groupBy query param is empty; envName is the name of the env

You can specify both query params. For example, the following settings aggregate metrics by environment, region, and organization and filters the results for the environment named prod:


groupBy=env,region,org&env=prod

Setting interval

The interval query parameter specifies the frequency that the metric is saved to the results. Each data point in the metric results is calculated over the preceding interval of time.

For example, if interval is 10 minutes, then the metric is calcluated over the previous 10 minutes, and written to the results every 10 minutes.

The interval query parameter value supports the following format:

  • <value><unit> where:
    • <value> – an integer
    • <unit> – a time unit of: u, ms, s, sec, m, h, d, w

For example:

  • 1m
  • 10h
  • 2d

Setting to and from

By default, the API returns alerts for the previousz hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)

  • -<value><unit> specifes a time in the past (note the leading hyphen):

    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:

    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

MetricsResult

For more information, see MetricsResult.
MethodEndpointDescription
get/latency

Gets latency metrics for requests to Edge and to backend targets. Specify filters such as proxy name, interval, target, status code, and many others.

For this API:

  • You must specify the percentile query parameter as 50, 90, 95, or 99. For example, if you specify 90, the API returns the total response latency value in the 90th percentile.

Setting interval

The interval query parameter defines the update interval for the value in the results, where:

  • interval specifies the frequency that the metric is saved to the results. Must be set to multiples of 60 seconds, with a minimum value of 60 seconds and a maximum value of 300 seconds (5 minutes).

The interval query parameter value supports the following format:

  • <value><unit> where:
    • <value> – an integer
    • <unit> – a time unit of: u, ms, s, sec, m, h, d, w

For example:

  • 1u
  • 2s
  • 5m

Setting to and from

By default, the API returns alerts for the previous hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/traffic

Gets traffic metrics. Specify filters such as proxy name, interval, time window, target, status code, and many others.

Setting groupBy and env

The groupBy query parameter specifies how to aggregate metrics. The env query parameter filters results by a specific environment name. You must specify either groupBy to include the env option or specify an environment name using the env query parameter. For example:


groupBy=env // env query param is empty

or:


env=envName // groupBy query param is empty; envName is the name of the env

You can specify both query params. For example, the following settings aggregate metrics by environment, region, and organization and filters the results for the environment named prod:


groupBy=env,region,org&env=prod

Setting interval

The interval query parameter specifies the frequency that the metric is saved to the results. Each data point in the metric results is calculated over the preceding interval of time.

For example, if interval is 10 minutes, then the metric is calcluated over the previous 10 minutes, and written to the results every 10 minutes.

The interval query parameter value supports the following format:

  • <value><unit> where:
    • <value> – an integer
    • <unit> – a time unit of: u, ms, s, sec, m, h, d, w

For example:

  • 1m
  • 10h
  • 2d

Setting to and from

By default, the API returns alerts for the previousz hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)

  • -<value><unit> specifes a time in the past (note the leading hyphen):

    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:

    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

MetricsSeries

For more information, see MetricsSeries.
MethodEndpointDescription
get/latency

Gets latency metrics for requests to Edge and to backend targets. Specify filters such as proxy name, interval, target, status code, and many others.

For this API:

  • You must specify the percentile query parameter as 50, 90, 95, or 99. For example, if you specify 90, the API returns the total response latency value in the 90th percentile.

Setting interval

The interval query parameter defines the update interval for the value in the results, where:

  • interval specifies the frequency that the metric is saved to the results. Must be set to multiples of 60 seconds, with a minimum value of 60 seconds and a maximum value of 300 seconds (5 minutes).

The interval query parameter value supports the following format:

  • <value><unit> where:
    • <value> – an integer
    • <unit> – a time unit of: u, ms, s, sec, m, h, d, w

For example:

  • 1u
  • 2s
  • 5m

Setting to and from

By default, the API returns alerts for the previous hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)
  • -<value><unit> specifes a time in the past (note the leading hyphen):
    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:
    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.

get/traffic

Gets traffic metrics. Specify filters such as proxy name, interval, time window, target, status code, and many others.

Setting groupBy and env

The groupBy query parameter specifies how to aggregate metrics. The env query parameter filters results by a specific environment name. You must specify either groupBy to include the env option or specify an environment name using the env query parameter. For example:


groupBy=env // env query param is empty

or:


env=envName // groupBy query param is empty; envName is the name of the env

You can specify both query params. For example, the following settings aggregate metrics by environment, region, and organization and filters the results for the environment named prod:


groupBy=env,region,org&env=prod

Setting interval

The interval query parameter specifies the frequency that the metric is saved to the results. Each data point in the metric results is calculated over the preceding interval of time.

For example, if interval is 10 minutes, then the metric is calcluated over the previous 10 minutes, and written to the results every 10 minutes.

The interval query parameter value supports the following format:

  • <value><unit> where:
    • <value> – an integer
    • <unit> – a time unit of: u, ms, s, sec, m, h, d, w

For example:

  • 1m
  • 10h
  • 2d

Setting to and from

By default, the API returns alerts for the previousz hour. Use the from and to query parameters to specify a different duration.

The from and to query parameter values support the following formats:

  • now (current time)

  • -<value><unit> specifes a time in the past (note the leading hyphen):

    • <value> – an integer
    • <unit> – a time unit of: s, sec, second, m, min, minute, h, hr, hour, d, day
  • An ISO formatted date as either:

    • yyyy-mm-ddThh:mm:ssZ
    • yyyy-mm-ddThh:mm:ss+00:00

For example:

  • now
  • -1h
  • -10min
  • 2018-08-13T14:04:00+00:00

Note: You can call this API at most six times per minute.

For more information and examples of this API, see View metrics data using the API.