I want to know whether PostgreSQL provides support for rest or is there any other way to achieve it?
Another project that try to solve this is PostgREST. It's written in Haskell not Java, but you can use it from Java using ordinary HTTP requests.
PostgREST serves a fully RESTful API from any existing PostgreSQL database. It provides a cleaner, more standards-compliant, faster API than you are likely to write from scratch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With