cancel
Showing results for 
Search instead for 
Did you mean: 

API Call from Hana XSJS to AWS S3

Former Member

Dear All,

We are working on a POC to place a file in AWS S3 folder (external network) by reading data from a view on Hana (On-Premise Application) , possibly through XSJS. If any of you worked on this requirement, may you please provide guidelines/xsjs sample code for making a POST call from Hana to off-premise AWS S3 please ?

Thanks

pfefferf
Active Contributor

I have no example for doing a POST to AWS S3 from XSJS, but you should be able to figure it out by yourself checking the XS JavaScript API Reference documentation. Especially the example here should give you the general necessary structure for doing an outbound call. Of course the example is a GET example, but you just need to change the HTTP method to post and provide the other necessary things required by the S3 API (e.g. specific headers, ...).

Consider: That API is valid for XS Classic and the XSJS compatibility mode of XS Advanced. I would not recommend to set up a new project in the way. Instead an XS Advanced Implementation (either with Node.js or Java) would be the better approach for the future. With that you have also more options to fulfill your requirement (e.g. using the AWS Node.js SDK).

Regards,
Florian

davidgbarbero
Participant
0 Kudos

Did you find any solution?

Accepted Solutions (0)

Answers (1)

Answers (1)

SergioG_TX
Active Contributor
0 Kudos

Hari, check out the outbound connectivity topic. You will need to create an xshttpdest file for your destination. and also an xsjs file that makes the post call - here is the official documentation from XSJS

https://help.sap.com/viewer/52715f71adba4aaeb480d946c742d1f6/2.0.02/en-US/d9ed319b25a644799eac5dca8d...