on 05-13-2022 10:46 AM
Hello Experts,
I have a requirement to remove certain set of fields from response of an API in SAP API management. Could you please guide how this can be done ?
Regards,
Varun Vichare.
Hi Varun
You have a couple of options for transforming API output in API Management. If the response is XML, you can do an XSLT transformation with the XSL Transform policy (located in the Mediation Policies category). If the response is JSON, you can transform it with the JavaScript policy (located in the Extension Policies category).
Regards,
Morten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi varun_vichare_cpi
There is an example of modifying a JSON response using JavaScript in the blog post SAP API Management – Mash-Up in an API proxy by svenhuberti. Scroll down to section "Add the geocoding information to the backend response". Sven adds elements rather than removing them, but updating the script should be simple enough - and is left as an exercise for the reader i.e. you 🙂
Regards,
Morten
Hello,
If you have exposed SuccessFactors OData APIs you can restrict using "role based permissions" (RBP) which your SF consultant will configure and assign to SFAPI user. Which (SFAPI credentials) need to be used by the consumer to access the API.
Or, if you are routing your APIs through CPI then you need to put the filter logic at CPI layer.
Regards,
Kris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.