You can translate the question and the replies:

Reading and writing data through REST services

Hi, I've table Employee with 20 attributes. I wanted to use this table for two purpose. 1. Expose Rest API for data exsiting in Employee table which am able to do 2. Expose POST REST service for inserting data into this table through Denodo. Only 5 attributes needs to be used in POST method and all of them are either string/number Is it possile to achieve? Do we need to two services one for consuming data and other one for inserting. Could you please provide if we have step by step guide to achieve the same. Thanks in advance. Regards Please let me know if
user
06-10-2017 13:50:51 -0400
code

1 Answer

Hi, I would use the same REST web service for consuming the data and also for inserting the data into the table. For POST method, if I want to insert values into the table for only some of the fields, I would verify the following : * The view which is exposed as REST web service should be “updateable” in order to perform Insert, Delete and Update operations. * The fields which are not used in POST body must either allow null or declared with a default value in the source. * Ensure to pass the values for all the non-nullable fields and the fields which are PRIMARY key or has UNIQUE constraint in the source.   You can refer to [IDU Requests](https://community.denodo.com/docs/html/browse/6.0/vdp/administration/restful_architecture/restful_web_service/idu_requests) section of Virtual DataPort Administration guide and  [PUT / POST REST WS](https://community.denodo.com/answers/question/details?questionId=90670000000XcMkAAK&title=PUT+%2F+POST+REST+WS) community answer for more information. Hope this helps!
Denodo Team
09-10-2017 09:10:24 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here