DataPower Gateway only

Activity Log (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.

Restriction:
  • The Activity Log policy can be used only with the DataPower® Gateway.
  • Activity log policies that call for logging of Analytics data upon success do not apply for the OAuth provider API. The OAuth provider API logs Analytics data for failure cases, but does not log successful cases.
Note: The Micro Gateway does not support the Activity Log policy. However, the Micro Gateway does collect the basic analytic statistics. The statistics that the Micro Gateway gathers are equivalent to what an Activity Log policy in the DataPower Gateway with Content:activity settings gathers with some exceptions:
  • For the following fields, the Micro Gateway does not collect the information and sends empty payload: requestHttpHeaders, responseHttpHeaders, and debug.
  • When the Micro Gateway starts with an APIMANAGER environment variable that specifies a valid Management server, the Micro Gateway automatically collects the basic analytic statistics. There is no mechanism to turn the collection function on or off at runtime.

About

An API event record exists for each API execution event in the Gateway server. By default, the content type that is collected and stored in API event records is 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 fields.

You can attach this policy to the following API flows:
  • REST
  • SOAP

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.

Table 1. Activity Log policy properties
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:
  • none: Indicates that no logging occurs.
    Restriction: This option disables notifications for application developers who use your Developer Portal.
  • activity: Logs invocation only (only the resource URI is recorded).
  • header: Logs activity and header.
  • payload: Logs activity, header, and payload (the original request, if any, and the final response).

The default value is activity.

string
Error content No Indicates what content to log if an error occurs.
Valid values:
  • none: Indicates that no logging occurs.
    Restriction: This option disables notifications for application developers who use your Developer Portal.
  • activity: Logs invocation only (only the resource URI is recorded).
  • header: Logs activity and header.
  • payload: Logs activity, header, and payload (the original request, if any, and the final response).

The default value is payload.

string