After much deliberation, it was clear to me that I dont understand the HATEOS part of REST and that I have been using the url as a filter and get or post parameters as variables for calling some functions on the backend server. And often, for an SPA, I would have to do multiple queeies in quick succession.
Then I realised, why cant I simply group those multiple query calls into one giant post request, with custom codes for querying or mutation, send a post request with a body that is a DSL i have thought of, and let my backend decode that DSL and send the replies. No longer would I be limited by URL structure, no longer would I have to make multiple query calls for getting a complex nested entity.
The only downside is that I have to docume t it more thoroughly and that my api does not have easy discoverability.
But since I have only one client, my frontend that I program,this is not an issue.
After pondering over the DSL a bit, I realised I am actually conceptualizing GraphQL.