Key concepts of API Connect analytics
An overview of how API Connect analytics works.
How the gateway and analytics services work together
When a user calls one of your published APIs, the gateway that processes the API call creates an API event record that contains details of the API call such as the application ID, current time, result code, etc. For a full list of all the data stored in an API event record, see API event record field reference. The gateway buffers API event records for each API call until a threshold of either number of events, or elapsed time is reached. When this threshold is reached, the API events are sent in bulk to the analytics subsystem. API events are sent by the gateway to the management subsystem with TCP, and if a network failure occurs the gateway does retry. However, the gateway does not retain unsent API event records and retry indefinitely, and so delivery of every API event record is not guaranteed.
Customizing the analytics data that is stored for your APIs
see .
activity log policy to control the level of detail that is recorded in API event
data. If you use DataPower Nano
Gateway
or webMethods API Gateway, use log invocation policies instead of the
activity log policy. activity log property to specify the data that is stored in
API event records for calls to the API. The activity log property provides separate
settings for successful API calls and failed API calls. The available activity log options are as
follows:If you want to make specific customizations to your API event data you can use a
gateway script or the set-variable operation in the definitions of each API that
you want to customize. See Customizing data with a gateway script or set-variable operation.
Accessing your analytics data
- In the API Manager UI, the provider organization owner can see analytics data for APIs that are published in their catalogs.
- In the UI, the API consumer can see analytics data for APIs published in their consumer organization.
Your analytics data can also be accessed by using the toolkit CLI or REST API.
You can manage user access to analytics data with User roles and permissions. For more information about user-based analytics data visibility, see Catalogs, spaces, and analytics
You can export analytics data from your UIs, however, UI export is not a practical method if you want to export more than 200 API event records. Use the toolkit CLI or REST API to export more than 200 API event records at a time. If you think that you might want to regularly export all your analytics data, then consider Offloading your analytics data to a third-party system.
Offloading your analytics data to a third-party system
The API event data that is received from your gateways can be directed to a third-party system, instead of or in addition to being stored by the analytics subsystem.
You can offload your analytics data to an AWS S3 or Splunk server. For more information about offloading, see Offloading analytics data.