My Oracle Support Banner

Oracle API Gateway JSON Remove Node Filter Does Not Accept Runtime Attribute (Doc ID 2061725.1)

Last updated on OCTOBER 07, 2022

Applies to:

Oracle API Gateway - Version and later
Information in this document applies to any platform.


The following example URL is meant to access a policy where user can specify the return field or fields they would like removed from a piece of JSON:


The example JSON being used is the following:

In this test, the intention would be to remove the <FIELD1> and <FIELD4> nodes from the JSON before returning the response.

In the policy being used, there is a "Validate REST Filter" filter being used extract the query string content to the "params.query.fields" attribute, which should then be used in the "JSON Remove Node" filter to remove the JSON nodes corresponding to the values in the attribute.  The following JSON Path is being specified in the filter: $.data.address.[${params.query.fields}]

The filter does not accept the attribute (wrong syntax error when an attempt is made to save the filter).

If the filter is used with a hard coded value instead, it works fine: $.data.<TOP NODE>.[<FIELD1>.<FIELD4>]

Is it possible to achieve the functionality desired in this case?


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.