You might be interested in PostgREST ( https://postgrest.org/en/v8.0/)
> PostgREST is a standalone web server that turns your PostgreSQL database directly into a RESTful API. The structural constraints and permissions in the database determine the API endpoints and operations.