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.
- 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.
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
, anddebug
. - 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.
- 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.
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 |