activity-log
Use the Activity Log policy to configure your logging preferences for the API activity that is stored in analytics. The preferences that you specify will override the default settings for collecting and storing details of the API activity.
- activity-log:
title: title
description: description
content: activity_to_log_if_call_successful
error-content: activity_to_log_if_call_unsuccessful
Apply this policy by adding an assembly extension with an execute field to your OpenAPI (Swagger 2.0) definition file.
You can also apply an activity-log policy by using the API Designer assembly editor to add a built-in policy to the API. For more information, see Activity Log (activity-log) in the built-in policies section.
For more information on activity-log output with examples, see ../com.ibm.apic.apionprem.doc/rapim_analytics_apieventrecordfields.html
Property label | Required | Description | Data type |
---|---|---|---|
Title | Yes | A title for the policy is required, but a default value, activity-log is provided. |
string |
Description | No | A description of the policy. | string |
Content | Yes | Defines the type of content to be logged when the operation is successful. Valid values:
The default value is
|
string |
Error content | No | Indicates what content to log if an error occurs. Valid values:
The default value is
|
string |
Example 1
# use defaults
- activity-log:
title: default activity logging
Example 2
- activity-log:
title: no logging for successful calls
content: none
error-content: activity