Skip to Content

API Logs

Introduction

The API Logs page within API Manager displays a table of all API processing logs as well as debug logs (if debug logging is enabled). Logs display for Custom, OData, and Proxy APIs when they are called through the Cloud API Gateway or Private API Gateway.

There are four types of logs that can be recorded for an API call:

  • API Logs: API logs are automatically generated on the API Logs page for each API Manager API call. API logs contain information about the API call, including the timestamp of the API request, the HTTP status code, the request ID, the request method, the request URI, the response time, the source IP of the calling application, the source application, and any log messages.
  • API Debug Logs: API debug logs are additional entries in an existing API log that fully trace every request received through an API Manager API's service URL. API debug logging is not enabled by default and must be enabled on an individual API Manager API for API debug logs to be included in an API log.
  • API Verbose Logs: API verbose logs are additional entries in an existing API log that consist of request and response data received or sent through an API Manager API's service URL. API verbose logging is not enabled by default and must be enabled on an individual API Manager API for API verbose logs to be included in an API log.
  • API Operation Logs: API operation logs contain the start of an API call and the time elapsed. Unlike API logs, debug logs, and verbose logs, API operation logs require the use of a Private Agent and are enabled in the Private Agent configuration file. These logs are recorded on the Private Agent in the jitterbit.log file located in the log directory.

Logging data for API logs, debug logs, and verbose logs is available on the API Logs page for 90 days from the date the API is consumed.

For more information on enabling debug logs and verbose logs, see these resources:

To add additional log information for OData APIs, including SQL data sent to the database, edit the Private Agent configuration file and set DebugJDML to true.

Accessing the API Logs Page

The API Logs page can be accessed from the Harmony Portal menu, or from other pages within API Manager:

API Logs Page Header

The header along the top of the API Logs page includes the API Manager navigation menu, a search bar, filters, and additional options:

You can adjust the data displayed by using the Filter By and View Data dropdowns.

Filter By

The Filter By dropdowns allow you to display API logs based on specific criteria across any combination of environments, APIs, profiles, status codes, or request methods.

Each filter displays a dropdown list of criteria from which you can select one or multiple criteria.

These are the available criteria to filter by:

  • Environments: Use the dropdown to select environments where the APIs are located. When all filters are unselected, environments for all APIs in the organization to which you have access are displayed.

  • APIs: Use the dropdown to select published APIs within the organization. When all filters are unselected, all APIs in the organization to which you have access are displayed.

    Note

    Previously published APIs that become unpublished will not appear in the APIs dropdown. API logs for these APIs will be present on the API Logs page, but cannot be filtered.

  • Profiles: Use the dropdown to select the assigned security profiles of the APIs. When all filters are unselected, all security profiles in the organization to which you have access are displayed.

  • Status Codes: Use the dropdown to select the HTTP response status code groups, selecting from Success (2xx), Redirections (3xx), Client Errors (4xx), and Server Errors (5xx). When all filters are unselected, all HTTP response status codes for APIs in the organizations to which you have access are displayed. For more information on status codes, see w3.org status code definitions.

  • Request Methods: Use the dropdown to select the HTTP request methods, selecting from GET, PUT, POST, DELETE, PATCH, and MERGE. When all filters are unselected, all HTTP request methods for APIs in the organization to which you have access are displayed. For more information on HTTP request methods, see w3.org request methods.

View Data

The View Data option allows you to display logs within a specific period of time. The default setting for the period of time is Last 7 Days.

Use the View Data dropdown to select the desired period of time. Select one of Last 10 Minutes, Last 1 Hour, Last 10 Hours, Last 24 Hours, Last 7 Days, Last 1 Month, or Custom Period.

Selecting Custom Period allows you to display API logs within a specified time period. When this option is selected, additional From and To calendar fields display:

  • From: Click to adjust the starting date and time for the API logs.
  • To: Click to adjust the ending date and time for the API logs.

After clicking the From or To calendar fields, a calendar dialog is displayed where you select the date and time:

Searching

The search bar allows you to filter the logs by the search criteria provided below:

  • Only Logs with Messages: Select to further restrict search results only to logs that include logging details. The search results will automatically refresh.

Search Criteria

These are the search criteria that can be used. Examples of valid and invalid search criteria are included:

Criterion Valid Search Invalid Search
Request ID

requestid=123%;

requestid=fI9KRyjM%;

requestid!=123%;
Request URI

requesturi=%acme2.jitterbit.net%;

requesturi=%jitterbit.net/defaultUrlPrefix/test;

requesturi=%[environment]/[version]/test;

requesturi=%[environment]/[version]/test%

requesturi!=%acme2.jitterbit.net%;

Response Time

responsetime>5;

responsetime<5;

responsetime>=5;

responsetime<=5;

responsetime=0;

responsetime!=5;


Source IP sourceip=14.141%;

sourceip!=14.141%;

Source Application

sourceapp=Mozilla%;

sourceapp=%Chrome%;

sourceapp!=Mozilla%;

Message

message=%REJECT%;

message=%Access Denied%;

message=%Ran successfully!%;

message!=%REJECT%;

Searches can contain a combination of criteria. Combined search criteria must be separated by a semi-colon (;) between each criterion. These are examples of valid combined searches:

message=%Access Denied%;requesturi=%contacts%;
requestid=%yzaccwui%;message=%REJECT%;
requesturi=%contacts%;responsetime<=2;
responsetime>=5;sourceapp=%Chrome%;
responsetime>=5;sourceip=70.5%;
sourceapp=%Chrome%;message=%REJECT%;
sourceapp=%Mozilla%;responsetime<=1;
sourceip=70.5%;requesturi=%contacts%;

Additional Options

Additional API log options display on the left side of the page directly above the search bar:

  • View Last Refreshed: Displays the last time the data was refreshed either dynamically or manually. The time is displayed in the format h:mm:ss.

  • Refresh: Click to refresh the log data based on the applied filters and search criteria.

  • Download as CSV: Click to download the current log data based on the applied filters and search criteria.

    Note

    The date field within the CSV file is a UNIX timestamp that will require conversion if you want to use a different date and time format.

Viewing API Logs

Each row in the API logs table displays API logging data for an API call:

  • Time Stamp: The timestamp of the API request. Times are displayed in your browser's time zone.
  • Status Code: The HTTP status code. For more information on HTTP status codes, see w3.org status code definitions.
  • Request ID: A unique ID for the API request.
  • Request Method: The API's HTTP request method (GET, PUT, POST, DELETE, PATCH, or MERGE).
  • Request URI: The full URL of the API that was called. Hover over the Request URI field to view the full URL.
  • Response Time: The amount of time, in milliseconds, that the API took to execute.
  • Source IP: The external IP address of the application or server that called the API.
  • Source Application: The source application for the API call, present only when the API call is being passed in a request header. Hover over the Source Application column to view the contents of the field.

Each page displays 20 logs. You can view all the logs within the filter and search criteria using the Next and Previous buttons.

Viewing Log Details

To view additional log details or debug logs (if enabled), click the expand icon on a log entry:

A typical API log will contain these details:

  • Harmony region domain name, service path, and base URL (see API Service URL)
  • API call processing time
  • Security profile information such as authorization type and credentials used
  • Payload details including length of the payload and the response size
  • Error information (if applicable)
  • Debug logs (if enabled)
  • Verbose logs (if enabled)