REST API with JSON?

Hi all,

I’m having a very hard time (read: it ain’t working) to get Data Services 4.2 SP06 to communicate with a REST API that replies in JSON.

It’s using Basic authentication, so nothing fancy there, but I cannot get DS 4.2 SP06 to successfully communicate with it.

I have attempted to follow the instructions on the links below, using SoapUI to generate a WADL and modify said WADL accordingly. I eventually get the API configured as a Data Store in the Designer but I can’t get it to actually talk to the REST API and retrieve the output data structure.

So when I setup a function call, I get a generic “RESPONSE” field but that’s not correct, as DS should be retrieving the actual response structure IF it could actually talk to the API.

https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=462043059

https://launchpad.support.sap.com/#/notes/2230626

Firewalls, etç. aren’t an issue and I can communicate with the API using a browser just fine. So can SoapUI so the issue really lies with DS - or my inability to correctly follow those instructions above. (Truth be told, that Wiki entry seems to have been written on a napkin and then just dumped online.)

Has anyone managed to get DS to work with a JSON-spitting REST API? if so, any tips or pointers would be much appreciated.


ErikR :new_zealand: (BOB member since 2007-01-10)

I tried doing a bulk data extract via APIs (eugh) using DS a little while back. I tried and gave up…

In the end we got a java developer to write some code to dump the needed data into json formatted files which DS easily consumed. Not quite an API wrapper but an API dumper. Good luck.


Darth Services :uk: (BOB member since 2007-11-20)

Some more digging and I came across this post detailing to setup an HTTP Adapter first and use that to call REST Web Services (opposed to setting them up directly in the Designer?).

https://blogs.sap.com/2013/07/01/consuming-rest-web-service-with-parameters-in-bods-using-http-adapter/

The problem here is that it expects input and output XSD schemas so I assume that it’s just translating the Data Services SOAP-based XML requests in the Java stack layer to actual REST API calls?

I’m just a bit confused here. I know that this posts is a bit older but the approach of setting up a HTTP Adapter is also documented in the 4.2 SP08 adapter manual. What is the difference between setting up an HTTP Adapter vs setting up a REST Web Service Data Store directly in the Designer?

And how does one go about when a) I do not have any inputs for one of my APIs and b) I don’t have a response XSD? Should I generate one through SoapUI first and use that to setup my HTTP Adapter?

I would very much like to hear from someone who has successfully managed to get REST API’s working with Data Services. SOAP Web Services aren’t a problem at all but the REST APIs are being a bit more problematic.


ErikR :new_zealand: (BOB member since 2007-01-10)