How to remove desired element or object from JSON response in webMethods (API gateway OR flow service)

Hi Community,

I am using SAG webMethods 10.15. I have a standard JSON response and I want to remove some elements from standard JSON response for specific Clients.

Lets take a scenario where we have Order Name, Order Status, Order Number and Order date in standard JSON response and I want to send Order Name, Order Status and Order Number to specific Clients.

I would appreciate if experts in community can guide me how can I achieve this in webMethods API Gateway or using flow service in SAG Designer.

Thanks

2 Likes

You can achieve this fairly easily using Data Masking policies. If you want to mask differently based on the client, you can define applications to group your consumers. In response processing, you can assign different data masking policies for different sets of applications.

To remove a JSON element, like order date, use the JSON path (ex: $.[ā€˜Order Dateā€™]) and check ā€œfilterā€ rather than ā€œmaskā€. Note that the bracket & single quote notation is required when there are spaces in the name.

Data Masking | Software AG - YouTube
Hope this helps,
Theo

5 Likes

Thank You @Theodore_Ezell1, I was able to filter response using the approach you suggested.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.