![DataPower
Gateway](../buildfiles/icon_datpowergtw.jpg)
Redaction - DataPower Gateway (v5 compatible)
Use the Redaction policy to completely remove or to redact specified fields from the Request body, the Response body, and the activity logs. You might find this policy useful for removing or blocking out sensitive data (for example, credit card details) for legal, security, or other reasons.
Gateway support
For information on the different types of gateway, see API Connect gateway types.
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 redact - DataPower Gateway (v5 compatible).
About
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 | No | The title of the policy. The default value is |
string |
Description | No | A description of the policy. | string |
Path | Yes | Specifies an XPath expression that defines the field to remove or redact. You can construct an XPath expression that is based on JSON or XML depending on whether your API requests and responses use a JSON or an XML format. If the payload is JSON, use the DataPower XML representation of the JSON content (JSONx) to construct the expression. Note: Use a JSONx representation only
to identify the XPath expressions for the fields to remove or redact. Do not change the format of
any response bodies in API
Manager.
To learn more about constructing XPath expressions that are based on JSON or XML, see Constructing XPath expressions to redact fields. |
string |
Action | Yes | Specifies whether you want to remove or redact the field. Valid values:
The default value is Note: If a numerical value is being
redacted, the redacted value is depicted as
****** and the type is changed to
string . |
string |
From | Yes | Specifies where to remove or redact the specified field from. Valid values:
The default value is Optionally click Add item to specify additional values. |
string |