How to create REST API which will fetch data from custom table?
- Declare new service contract interface, see this
- In the model implementing this interface read data from custom table (via resource model)
- Expose created service contract interface as web API, see this
Also might be useful to look at any core APIs as an example (e.g.