This is the WSO2 Data Services Server documentation version 2.6.3

Generate a Data Service Using a Carbon Data Source

The WSO2 Data Services Server provides the "Generate" feature to create data services automatically using a given database structure. When generating the service, the Data Services Server considers the table structure according to the given table structure. "SELECT", "INSERT", "UPDATE", and "DELETE" operations get automatically created.

First, you need to add a Carbon Data Source to the Data Services Server. For information on adding a Carbon Data Source, refer to Adding a Data Source in the Configuration section.

Follow the instructions below to generate data services using the Data Source created.

1. Log on to the Data Services Server Management Console.

2. Click the "Main" tab and select the "Generate" link under "Data Services."

3. The "Select Data Source" page appears. Select the Data Source (refer to Adding a Data Source) and give the database name.

4. Once the database is selected, the table structure will be displayed according to the given database. Select the preferred tables for the data service generation in the Customize Service Generation page and click "Next." For example,

5. Once tables are selected, a service generation mode needs to be specified. There are two options to generate the data service.

  • As a single service where all operations for each table are given in a single data service.
  • Multiple services for each table where, for a given table, only operations related to that table will be specified.

Following example, let's create a single service for all tables.

6. Once the service generation mode is selected, data services will get deployed. View the deployed services and click finish.

7. You will be navigated to the "Deployed services" page.

From this page, you can manage your service.