Roastery
The OData v4 service behind the Atscript OData demos.
A coffee roaster's wholesale desk: coffees, cafés, orders and their items, five code lists, and a few operations. Atscript OData connects OData services, such as those of SAP® systems, to Atscript UI and Moost; both demos show the same screens over this service, one from the browser and one through a Moost server.
The service is the open-source mock server @sap-ux/fe-mockserver-core (Apache-2.0), serving one
EDMX file with seed data and a few handlers, behind a small guard.
The data is shared: every visitor reads and writes the same rows. It resets every 30 minutes.
The service
- /odata/v4/roastery/The service root: its entity sets
- /odata/v4/roastery/$metadataTypes, operations and annotations
Try it
- Coffees?$top=3Three coffees
- Orders?$filter=status_code eq 'C'&$orderby=orderDate desc&$top=10The ten newest confirmed orders
- Orders(1091)?$expand=itemsOne order with its items
- Orders?$apply=groupby((status_code,statusName),aggregate($count as orders))Orders per status
- bestsellers(weeks=12,count=3)An unbound function: the three coffees ordered most in 12 weeks
No CORS: call the service from a server, or from a page through a proxy on its own origin, as the apps do.
The demos
- browser.demo.odata.atscript.devThe page talks OData to the service with the browser client
- moost.demo.odata.atscript.devThe page talks to a Moost server, which talks OData to the service
- github.com/moostjs/atscript-odata-demo-serviceThe source of this service