You can translate the question and the replies:

REST - get response without the enitre HTML page

After deploying a REST web service, we can use the lnk in the table at the Web Service COntainer page to get data from the view. But, the response to these REST calls are complete HTML pages. Is there a way to just get the data, instead of the entire page.
user
07-10-2015 10:03:26 -0400

2 Answers

Hi, The REST Web Service in Denodo can represent the data as HTML, JSON or XML, this can be set on the Settings tab when you the Edit Web Service. The data has to be returned by the Web Service in some defined structure, whether it is HTML, JSON or XML. The JSON or XML representations focus on describing the data only, whereas the HTML representation also describes how the data should be formatted in a browser. HTML is usually the default representation when you define a REST web service and the JSON and XML representations are also published by default (although this can be changed). If you would like to receive the data in JSON or XML formats add the $format=JSON or $format=XML parameter to the end of the URL for the web service e.g.: for an 'address' web service exposing an 'address' view in the 'admin' VDP database http://localhost:9090/server/admin/address/views/address?$format=json or http://localhost:9090/server/admin/address/views/address?$format=xml This is described fully in the Virtual DataPort Administration Guide in the section entitled PUBLISHING REST WEB SERVICES. You can download the guide here: https://community.denodo.com/docs/view/document/Virtual%20DataPort/Denodo%205.5/Virtual%20DataPort%20Administration%20Guide Hope this helps.
Denodo Team
07-10-2015 11:06:04 -0400
You can also set your HTML header appropriately by passing in the Content-Type of application/json if you don't want to use the URL parameter.
user
07-10-2015 13:41:29 -0400
You must sign in to add an answer. If you do not have an account, you can register here