Request Transformer

On this page

Overview

Use the Request Transformer policy to transform a request before being passed onto the remaining API policies and finally for Pipeline execution.

Policy Execution Order

Transformation of request headers works in the following policy sequence for both APIs and Proxies:
Authorize By Role ➡️ Anonymous Authenticator ➡️ Request Transformer.

Expression Enabled Fields in API Policies

All expression enabled fields take expressions from the SnapLogic Expression Language and the API Policy Manager functions.

Fixed Issues

The Request Transformer, Authorize by Role, and other Proxy-only policies can now use Basic Auth for authentication. Previously, this combination did not work.

Settings

Parameter NameDescriptionDefault ValueExample
LabelRequired. The name for the API policy.Request TransformerReqTrans-TestShared
When this policy should be appliedAn expression enabled field that determines the condition to be fulfilled for the API policy to execute.Truerequest.method == “POST”
Headers to Add/Replace

The list of headers to add or replace into the request.

If the name or value of an entry in the table is blank, no changes are made.

N/AN/A
NameThe name for the header to add or replace.N/AX-content-type-options
Value

The value(s) for the header. If this field is an expression, it can return a list to simulate the header being repeated multiple times in the original request.

If the header in the original request was repeated multiple times, this new value replaces all of the original values. If the original values need to be preserved, this field should be an expression that gets the original value and returns a modified version.

N/Anosniff
Headers to RemoveThe list of headers to remove from the request.

The subfield Name functions the same way it does for Headers to Add/Replace.
N/Ax-content-age
Status

Indicates whether the API policy is enabled or disabled. 


EnabledDisabled


Using _ in Headers

Use '-' (dash) instead of '_' (underscore) in header name as '_' is ignored and the header is not captured.  '-' is internally transformed to '_' for you to map to the Pipeline parameter. For example, HTTP-ACCEPT instead of HTTP_ACCEPT.