Problem with REST API
Using REST API makes use of endpoints and each endpoint corresponding to a resource. It seems very simple, but it has multiple drawbacks, including:
Under-fetching: Single endpoint may not satisfy what the client needs, which you will need to call multiple endpoints to render the page (n + 1 problem)
Over-fetching: It is hard to flexibly choose what properties (data) you need from resources, the endpoint can give you more data than what you want.
Even you want to optimize the performance and get rid of the under/over fetching problem by creating a dedicating endpoint, it can lead to endpoint explosions at the end (too many endpoints) and hard to be maintained.