Activity log policy
Configure the activity log policy to manage the level of detail of the data stored in API events.
When you configure an API in the API
Manager UI, you choose what data is
stored in the API event records for calls to that API with the
activity log
property. The activity log property has separate settings for successful API calls,
and for failed API calls. The activity log options are: Note:
If your gateway is configured to authenticate all API calls with an OAuth provider, the data that is related to the OAuth call is only included in the API event data when the OAuth call fails. Successful OAuth authentication is not recorded in the API event data.
Important: The maximum API event record size is 19 Mb. The analytics
subsystem rejects any API event records that are larger than 19 Mb.
Defining log setting in the API Manager UI
- In the API Manager UI Develop view, select the API that you want to work with. If you are not familiar with the API Manager UI Develop view, see Working with API definitions.
- Select the Gateway tab, expand Gateway and portal settings, then select Activity Log.
- Select Enabled, then select the preferred log setting for
Success Content and Error Content:
- Click Save to save your changes.
Defining log setting in source for DataPower® API Gateway
Use the activity-log extension to configure your logging preferences.
activity-log:
success-content: <success log setting: none, activity, header, payload>
error-content: <failure log setting: none, activity, header, payload>
enabled: <if activity logging is enabled: true or false>Note: If payload logging is enabled, for the gateway to
capture payloads buffering must also be enabled.
Exampleactivity-log:
success-content: <success log setting: none, activity, header, payload>
error-content: <failure log setting: none, activity, header, payload>
enabled: <if activity logging is enabled: true or false>
buffering: true- No logging of successful calls, header logging for failed calls
-
activity-log: success-content: none error-content: header enabled: true - Disable activity logging
-
activity-log: enabled: false