Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this tutorial, we will run through the process of exposing and RDBMS as an OData service. When OData is enabled for an datasource, you do not need to manually define CRUD operations. These will be automatically created.

...


Access the data service using CRUD operations

Open a command prompt execute the following CURL commands using CRUD operations:

Note

Note that the user should have privileges to perform CRUD operations on the database. For Oracle databases, the user should be the schema owner. If not, the OData service will not work properly.

  • To get the service document:

    Code Block
    curl -X GET -H 'Accept: application/json' https://localhost:9443/odata/{data_service_name}/{data_souresource_id}
  • To get the metadata of the service:

    Code Block
    curl -X GET -H 'Accept: application/xml' https://localhost:9443/odata/{data_service_name}/{data_souresource_id}/$metadata
  • To read details from the ACCOUNT table:

    Code Block
    curl -X GET -H 'Accept: application/xml' https://localhost:9443/odata/{data_service_name}/{data_souresource_id}/ACCOUNT