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 11.1.2.1.0 and laterInformation in this document applies to any platform.
Goal
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:
http://<HOST>:<PORT>/<URI>?<FIELDS>=<FIELD1>,<FIELD4>
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?
Solution
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
Goal |
Solution |