Activity Log
Use the Activity Log policy to configure your logging preferences for the API activity that is stored in IBM® API Connect analytics. The preferences that you specify will override the default settings for collecting and storing details of the API activity.
Gateway support
Gateway | Policy version |
---|---|
DataPower® Gateway (v5 compatible) | 1.0.0 |
This topic describes how to configure the policy in the assembly user interface; for details on how to configure the policy in your OpenAPI source, see activity-log.
Note that if you are using the DataPower API Gateway, you can configure your logging preferences by using the API design editor. For more information, see Configuring activity logging (OpenAPI 2.0) or Configuring activity logging (OpenAPI 3.0).
About
activity
for when
API execution completes successfully, and payload
for when API execution completes
with an error code. Apply the Activity
Log policy to your
assembly to change the type of content to log in these API event records. For more information
about API event records, see API
event record field reference.x-ibm-configuration:
...
activity-log:
enabled: true
error-content: payload
success-content: payload
...
buffering: true
Activity log policies that call for logging of analytics data upon success do not apply for the OAuth provider. The OAuth provider logs analytics data for failure cases, but does not log successful cases.
Properties
The following table lists the policy properties, indicates whether a property is required, specifies the valid and default values for input, and specifies the data type of the values.
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 |