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 Logs

Resource Summary

Security

Content Type

application/json, text/plain

Category

GetLogs

GET

Get Logs

Get log entries for the specified organization and environment.

 

By default, the API returns logs for the previous one 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 paramater value supports the following formats:

  • <value><unit> specifes a time in the past relative to the value of to:
    • <value> – an integer
    • <unit> – a time unit of: ns, us, ms, s, mh

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.

 

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

Resource URL

https://apimonitoring.enterprise.apigee.com /logs

Query Parameters

Name Values Description
org
(required)

Specify the name of the Edge organization.

env
(required)

Specify the name of the Edge environment.

proxy

Specify the name of an API proxy. Only log entries for that proxy are returned.

from

The beginning of the time interval for which log entries should be fetched in the ISO date format. The default value is the current time minus one hour.

You can specify either from or timeRange but not both. See the description above about setting this parameter.

to

The end of the time interval for which log entries should be fetched in the ISO date format. The default value is the current time. See the description above about setting this parameter.

timeRange

Duration prior to the to time for which log entries are fetched.

You can specify either from or timeRange but not both. See the description above about setting this parameter.

select

Filter returned logs by HTTP status codes or API proxy URI. Supported HTTP status values are: 2xx, 4xx, 5xx. Specify multiple values as a comma-separated list.

The stats query parameter lets you specify an explicit HTTP status codes in the form: 201, 404, 501.

source

Source of errors for which logs should be returned. Supported values are: proxy, target, or apigee. By default, logs from all sources are returned.

limit

The number of log entries that will be returned. The default value is 10.

region

Filter log entries by the specified region.

flow

Filter log entries by the specified fault flow.

policy

Filter log entries by the specified fault policy.

status

Filter log entries by the specified HTTP status code. For example, 201, 404, or 501.

The select query parameter lets you specify a range of HTTP status codes in the form: 2xx, 4xx, 5xx. Specify multiple values as a comma-separated list.

faultcode

Filter log entries by the specified faultcode.

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?)