The Acquisition Layer and REST Services
All the data manipulation operations (insert, update, delete, restore, and purge) are connected to the acquisition layer when the RESTful web service in OneData is invoked. To invoke a DML operation on a data object, OneData provides the following explicit and implicit interchange mapping options:
Implicit interchange mapping. This is the easiest option to perform DML operations in a data object. To use implicit interchange mapping, do the following:
Create an XML file in accordance with the XML schema (XSD) shown at the data object level. You can obtain this data from the External Services pane in the
Advanced Definition tab). The system internally creates an interchange mapping and performs the DML action.
Use the same request URL as for retrieving data. You can obtain the URL from the External Services pane in the
Advanced Definition tab.
Create a simple HTTP POST request or multipart POST request with the XML file created and the required request parameters as query string for the request. For information about the request parameters, see
Obtaining the XSD from
OneData .
Note: Only the XML files with an XSD-compliant structure are accepted. For conceptual objects, ensure that the XML element tag name is unique for all constituent objects.
Explicit interchange mapping. Even though most of the simple DML operations for an object can be handled through implicit interchange mapping, you can create more advanced interchange mapping and execute an existing interchange mapping for a data object by using RESTful services, as follows:
Create an interchange mapping (or use an existing one) of any valid type (delimited file, remote database, XML, or JSON).
Obtain the URL from the source information from the Interchange Mapping Definition screen. Use the following format: http://localhost:8080/onedata/rest/QA/StandardProject/IM/Employee Interchange.
If the interchange mapping is:
Delimited file, remote database, XML, or JSON. Create a simple HTTP POST request/multi-part POST request with the delimited file, XML, JSON and the required request parameters as a query string for the request. For information about the request parameters for each request type, see
REST URL Parameters.
Remote database type. Use a simple POST request with the required parameters as the query string to invoke the remote database interchange mapping. There is no need to provide a data file along with the request.
Note: While creating the simple POST request, the data file content must be added to the HTTP request body.