Articles in this section

Configure APIM analytics, logging, and notifications

Once your API is published, you can configure dashboards, health check monitoring, request logging, and notifications to track how it's performing and stay informed about events. This article is for publishers with access to the APIM console; for where these features sit in the console menu, see Navigate the APIM console. Several steps depend on your API definition version; both v2 and v4 are fully supported and covered here.

Generate a dashboard

  1. Select Settings in the main menu.
  2. Under the Portal heading, select Analytics. This page lists your existing Platform, API, and Application dashboards.

    settings_analytics.jpg
  3. Select Add a new platform dashboard, Add a new API dashboard, or Add a new application dashboard.

    settings_dashboard_anaytics_create.jpg
  4. Enter a Dashboard name and an optional Query filter.
  5. Add widgets — tables, line or pie charts, graphs, maps, or statistics — and select standard or custom fields for each.
  6. Turn on Enabled dashboard to make it live.
  7. Select Save.

The same Analytics page also has an HTTP Client Timeout setting that applies to dashboard data requests.

Health check analytics

A health check monitors whether your endpoints or gateways are available and responding as expected. Before configuring one, it helps to know these concepts:

  • Trigger — What starts the check: HTTP methods, paths, and headers.
  • Schedule — How often the check runs, in seconds up to years.
  • From root path — Applies the check's path at the root URL level instead of appending it — for example, it removes /api from www.test.com/api before appending the path.
  • Assertions — Expression Language conditions the response must meet, from a simple status check (#response.status == 200) to specific content matching.

Once configured, the Health-check dashboard for that API shows:

  • Global availability — Average availability and response time across every health-checked endpoint.
  • Per-endpoint availability — The same metrics, broken down by endpoint.
  • Latest check — A running list of recent checks, which you can filter to show only status transitions.

Enable health check analytics for a v4 API

  1. Open your API and select Endpoints.
  2. Select Edit for the endpoint group.
  3. Select the Health-check tab.

    api_endpoints_healthcheck.jpg
  4. Turn on Enabled.
  5. Configure the schedule (a preset interval or a custom cron expression), the HTTP Method, and the Target path. Turn on Override endpoint path to replace the endpoint's path instead of appending to it.
  6. Optionally, add HTTP headers and an Expression Language Assertion (for example, {#response.status == 200}), and set the Success Threshold and Failure Threshold (default: 2).
  7. Deploy the API to start the health-check service.

Enable health check analytics for a v2 API

  1. Open your API and navigate to Backend services > Health-check.

    Health_check_menu.png
  2. Turn on Enable health-check.

    Health_check_analytics.png
  3. Configure the trigger, schedule, and assertions.

View results for a single v2 API at Backend services > Health-check dashboard. For health check status across every API, use Dashboard > API Health Check in the main menu.

Logging

Turn on logging at the API level when you need to debug behavior. Use it sparingly — logging adds analytics storage overhead and can affect API performance.

anaytics_logs.jpg

Enable logging for a v4 API

  1. Open your API and select API Traffic.
  2. Select the Settings tab.

    apis_apitraffic_settings.jpg
  3. Turn on Enabled.
  4. Configure Logging mode (Entrypoint, Endpoint), Logging phase (Request, Response), and Content data (Headers, Payload).
  5. Optionally, add Display conditions in Expression Language to filter which requests get logged.

Enable logging for a v2 API

  1. Open your API and select Logs.

    API_Logs_menu.png
  2. Select Configure the logging.
  3. Choose your logging, content, and scope modes.

    Configure_API_logging.png

View log records

  • v4 APIs — Open your API and select API Traffic > Runtime Logs, filterable by period, entrypoint, HTTP method, or plan.
  • v2 APIs — Open your API and select Logs in the submenu.

You can also review a specific application's logs at Applications > your application > Logs, filtered by request or transaction ID, method, path, response time, HTTP status, or API.

Notifications

You can turn on notifications at the API, application, or system level.

Enable API notifications

  1. Open your API and go to its notification settings — Configuration > Notifications (v4) or Notification settings (v2).

    api_config_notif.jpg
  2. Select + Add notification.

    API_notifications_list.png
  3. Choose which events to subscribe to, grouped into categories such as API key, Subscription, Support, Lifecycle, Rating, and Review.

To delete a notification, open the same settings, select the delete icon on the notification, and confirm.

Enable application notifications

  1. Select Applications in the main menu and open your application.
  2. Select Notification settings.
  3. Select + Add notification and configure it using a Portal, Email, or Webhook notifier.

Enable system notifications

  1. Select Settings in the main menu.
  2. Under the Notifications heading, select Notification settings.

    settings_notif_new.jpg
  3. Select + Add notification.
  4. Enter a Name and choose a notifier — Default Email Notifier or Default Webhook Notifier.
  5. After creating the notification, edit it to choose which events it subscribes to.

    Settings_notifications.png