You are viewing the Apigee Management API reference documentation. For the main product docs, and to search all docs, go to https://docs.apigee.com. For cross-site search, click Search all in the search results.

Get Latency Metrics

Resource Summary

Security

Content Type

application/json, text/plain

Category

API Monitoring Metrics,

GetLatencyMetrics

GET

Get Latency Metrics

Get 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.
  • The windowsize is fixed at one minute.

Setting interval and windowsize

The interval and windowsize query parameters define the update interval and sampling window for value in the results, where:

  • interval specifies the frequency that the metric is saved to the results.  
  • windowsize specifies the size of the sampling window for the metric and must be set to 1m.

The interval query paramater values support the following format:

  • <value><unit> where:
    • <value> – an integer
    • <unit> – a time unit of: u, mss, secmh, d, w

For example:

  • 1u
  • 2s
  • 5m

Setting to and from

By default, the API returns alerts for the previous one hour. Use the from and to query parameters to specify a different duration. The maximum duration specified by from and to is 24 hours. 

 

The from and to query paramater 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%3A04%3A00%2B00%3A00

 

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

Resource URL

https://apimonitoring.enterprise.apigee.com /metrics/latency

Query Parameters

Name Values Description
org
(required)

Specify the name of the Edge organization.

percentile
(required)

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.

interval
(required)

Specifies the frequency that the latency metric is saved to the results. The maximum interval is 5 minutes (5m). See the description above about setting this parameter.

windowsize
(required)

Specifies the size of the sampling window for the metric. This parameter must be set to 1m. See the description above about setting this parameter.

select
(required)

Metrics to query. Values include: totalLatency and targetLatency. Specify multiple values as a comma-separated list.

groupBy
(required)

Tags to aggregate metrics by. Valid options are:

  • org,env,region
  • org,env,region,proxy
  • org,env,region,proxy,target

from
(required)

The beginning of the time interval for which metrics should be fetched. For example, -1h for one hour previous to the time specified by to. See the description above about setting this parameter.

to

The end of the time interval for which metrics should be fetched. The default value is the current time. See the description above about setting this parameter.

region

Filter metrics by the specified region. Specify multiple values as a comma-separated list.

env

Filter metrics by the specified environment. Specify multiple values as a comma-separated list.

proxy

Filter metrics by the specified API proxy name. Specify multiple values as a comma-separated list.

target

Filter metrics by the specified target domain name. Specify multiple values as a comma-separated list.

collection

Filter metrics by the UUID of the specified collection. Specify multiple values as a comma-separated list.

Header Parameters

Name Values Description
Authorization
(required)

OAuth token. Replace $TOKEN with your access token. See Get the tokens.

Request Body

HTTP Basic

OAuth 2.0

API Key

Reset

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Working...

Help or comments?

  • If something's not working: Ask the Apigee Community or see Apigee Support.
  • If something's wrong with the docs: Click the "Send Feedback" button.
    (Incorrect? Unclear? Broken link? Typo?)