Logs API

View logs aggregated by Apigee API Monitoring. For more information, see View logs using the API.

Resource Types

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

Error

For more information, see Error.
MethodEndpointDescription
get/logs

Gets traffic metrics.

By default, the API returns the most recent 10 logs for the previous hour. Use the from, to, and timeRange query parameters to specify a different duration. The from and to query paramaters use an ISO formatted time range. The date format can be either:

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

The timeRange query parameter value supports the following formats:

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

For example:

  • 1h
  • 10min

You can specify either from or timeRange but not both.

This API also defines query paramaters that you can use to filter the results by API proxy, region, fault flow, and other options.

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

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

get/logs/apiproxies

Get the list of API proxies associated with a specific virtual host and base path.

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

A virtual host on an Edge Router lets you specify a domain name, protocol such as HTTP/HTTPS, and port number. For example, you define a virtual host on an Edge Router with the following settings:

host alias = apis.acme.com
port = 443
TLS enabled

Based on these settings, a request to an API proxy associated with this virtual host uses the form:

https://apis.acme.com/proxy-base-path/resource-path

Where:

  • proxy-base-path is defined when you create an API proxy and is unique for each API proxy.
  • resource-path is the path to a resource accessible through the API proxy.

For more on virtual hosts, see About virtual hosts. For more information and examples of this API, see View logs using the API.

Log

For more information, see Log.
MethodEndpointDescription
get/logs

Gets traffic metrics.

By default, the API returns the most recent 10 logs for the previous hour. Use the from, to, and timeRange query parameters to specify a different duration. The from and to query paramaters use an ISO formatted time range. The date format can be either:

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

The timeRange query parameter value supports the following formats:

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

For example:

  • 1h
  • 10min

You can specify either from or timeRange but not both.

This API also defines query paramaters that you can use to filter the results by API proxy, region, fault flow, and other options.

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

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