Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: APIM-843

...

Expression Enabled Fields in API Policies

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

Starting in the October 2023 release, the Response Mapper and Response Transformer policies support the request and response functions in the APIM Expression Language. These functions enable you to modify the headers for your Proxy endpoints quickly. When you click (blue star) to enable the expression dropdown, you can access these functions.

...

Limitations

  • If a Proxy endpoint uses a Triggered Task with an open document output view for the response, the response will be a list, which requires that you index it by treating '$' as a list, such as '$[0]' to access the first response document, or the only document (if only one is present).

  • If your incoming data is a list, Pass through is not supported.

...

APIM functions display in the expressions dropdown menu but do not actually work.

Settings

Parameter Name

Description

Default Value

Example

Label

Required. The name for the API policy.

Request Size Limit

SizeLimit_DevOrg

When this policy should be applied

An expression-enabled field that determines the condition to be fulfilled for the API policy to execute.

True

request.method == "POST"

Pass through

This setting determines if data should be passed through or not.

If you select this checkbox, then all the original input data is passed into the output document together with the data transformation results.

If you deselect this checkbox, then only the data transformation results that are defined in the mapping section appear in the output document and the input data is discarded.

Selected

N/A

Mapping table

The mapping table consists of an Expression and Target field where you enter the mapping.

Expression

The function to use to transform the data. For example, combine, concatenate or flatten. Expressions that are evaluated replace the source targets at the end of the Pipeline runtime.

N/A

$customer

Target

The target JSON path where the value from the evaluated expression is written. For example, after evaluation of the $person.firstname expression the Snap inserts the firstname for the person object. If left blank, the source path is deleted.

N/A

Customer

Status

Indicates whether the API policy is enabled or disabled. 

Enabled

Disabled

Example

In the following example, multiple request and response headers are mapped to target headers in the response.

...