cancel
Showing results for 
Search instead for 
Did you mean: 

Pass the incoming payload using policies in SAP API Portal

former_member241350
Participant
0 Kudos

Hi,

I need to pass the incoming payload from mailchimp to SAP HCI using SAP API Management policies. Can anyone help with the policies which I can use here.

Regards,

Aman Raj

Accepted Solutions (0)

Answers (1)

Answers (1)

svenhuberti
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Aman,

it really depends on what you want to do with the payload.

Per default, API Management simply sends the payload "as-is" to the backend (and returns the response "as-is" as well).

If you want to change the format of the request (and response) payload, you can use the XML to JSON and JSON to XML policies.

If you want to modifiy the content of the incoming payload, you can do this using policies such as the Assign Message, the XSL Transform, the Java Script and the Extract Variables policies. For complex scenarios, it would be better to use SAP Cloud Platform Integration though.

A best-practice is to use API Management to fight off attacks on your backends, on every layer. One of the layers is payload-related: there you can use the XML-Threat Protection, the JSON-Threat Protection or the regular expression policies to inspect and validate the payload.

As you can see, you can do a lot with SAP API Management, but it really depends on your use case. One advice though: have a look at the SAP blog entries, since a lot of them are quite hands-on and explain how to work with the tool. Maybe the following one could be usefull to you to start with (even if they are more about adapting the response, rather than the request):

https://blogs.sap.com/2016/10/11/sap-api-management-mash-api-proxy/

https://blogs.sap.com/2016/10/10/sap-api-management-filter-response-api/

Cheers,

Sven

former_member241350
Participant
0 Kudos

Hi Sven,

Thanks for the reply.

I am calling API in SAP API Portal from Mailchimp, in debug mode i can see the request coming as well as the content coming from Mailchimp, but I cannot see the same content reaching my HCI iFlow from SAP API Management. I am also not able to see the API calls in SAP API portal while the HCI interface is getting triggered via API whenever I am doing any changes in Mailchimp.

Regards,

Aman

svenhuberti
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Aman,

there may be a lot of possibilities in why this is not working so I won't be able to help in detail.
But you may want to check the connection between CPI (fka. HCI) and APIM: are the credentials right? is the integration flow called correctly, ie. with the right payload? Do you see any error? Server-side/client-side?...

This is a pretty common scenario, implemented by thousands of customers. I am using it for personal demos as well so technically speaking, it is working.

Cheers,
Sven