There are not many people who I trust on the subject of API design like I do Phil Sturgeon. He has been a prominent speaker both online and at numerous conferences, covering a variety of problems, solutions, and approaches in the API design domain.
In one of his recent blog posts, he shared a diagram (see above) which provides a clear illustration on which API paradigm – REST, GraphQL, or RPC – one should pick for a web application, based on a variety of criteria.
I think this is probably the simplest of all the explanations I’ve seen around.
JSON Server is a handy tool for anybody working with or developing the REST/JSON APIs. It’s a ready-made “fake” API server, that is super easy to setup with your end points and your data. And the best part – it’s not just read-only. You can work with POST, PUT, PATCH, and DELETE requests too and the JSON Server will properly update your pre-configured data in the JSON files.