-
Notifications
You must be signed in to change notification settings - Fork 0
ODataService
DimaAy edited this page Aug 23, 2019
·
2 revisions
The service to populate the data and its metadata as Odata standard.
To build the project and its test it is enough to run, from ODataService directory:
$ mvn clean install
On the other hand, to run and deploy the project:
$ mvn clean spring-boot:run
Once started, the log files are available in the local target/logs directory.
After building and deploying the service to the server, you can try the following URLs for:
- Service Document http://localhost:8080/odata
- Metadata Document http://localhost:8080/odata/$metadata
- Read Entity Collection http://localhost:8080/odata/Product_Set
- Read a Single Entity http://localhost:8080/odata/Product_Set(1)
- Read a Property for a Single Entity http://localhost:8080/odata/Product_Set(1)/DESCRIPTION
- System Query Options: the following are some examples
-
$topThe first 2 entities http://localhost:8080/odata/Product_Set?$top=2 -
$skipExclude the first 2 entities http://localhost:8080/odata/Product_Set?$skip=2 -
$countAdd the full number of all entities to the response payload http://localhost:8080/odata/Product_Set?$count=true -
$orderbySort by ID descending http://localhost:8080/odata/Product_Set?$orderby=ID%20desc -
$selectSelect the ID of the entity collection http://localhost:8080/odata/Product_Set?$select=ID
or select the ID for a single entity http://localhost:8080/odata/Product_Set(1)?$select=ID -
$filterThe entities with ID greater than 2 http://localhost:8080/odata/Product_Set?$filter=ID%20gt%202
-