...
Log in to the management console and select Create under Data Service .
Create a data service to expose the MySQL database you created above.
- When you connect the datasource, select the OData check box as shown below.
Click Finish to save the data service.
Go to the Deployed Services screen and click the data service that you created. The endpoints for accessing data in the datasource will be shown.
Access the data service using CRUD operations
Open a command prompt execute the following CURL commands using CRUD operations:
To get the service document:
Code Block curl -X GET -H 'Accept: application/json' https://localhost:8243/odata/{data_service_name}/{data_source_id}
To get the metadata of the service:
Code Block curl -X GET -H 'Accept: application/xml' https://localhost:8243/odata/{data_service_name}/{data_source_id}/$metadata
To read details from the ACCOUNT table:
Code Block curl -X GET -H 'Accept: application/xml' https://localhost:8243/odata/{data_service_name}/{data_source_id}/ACCOUNT