The question may seems dumb but i need to access wordpress's default rest api from my custom wordpress plugin so that i can modify further for my custom api endpoints and post data to a third party api.
I need to access and have all the data and functionalities of the existing rest api but i don't want to fetch data from database by querying again. Instead i want to call the rest api directly from plugin.
Now the problem it doesn't seems right to calling rest api from a plugin. If i want to avoid querying again from database is this a valid approach (calling rest api) or there are other better ways to do that?