⚠️ what you’ve created is a CRUD API, not a REST API

What needs to be done to make the REST architectural style clear on the notion that hypertext is a constraint? In other words, if the engine of application state (and hence the API) is not being driven by hypertext, then it cannot be RESTful and cannot be a REST API. Period. Is there some broken manual somewhere that needs to be fixed?
— Roy Fielding https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven

a resource has a state, yes, and the hypertext on the resource has to guide users:

e.g., http://domain.com/cars/30a989afc82c0a211 HTTP 200 response:

{ 
"_id": "30a989afc82c0a211",
"weight": "1.8 tons",
"model": "...",
"year": "...",
...,
"_links": {
"self": { "href": "http://domain.com/cars/30a989afc82c0a211" },
"start": { "href": "http://domain.com/cars/30a989afc82c0a211/drive/invoke" },
"lock": { "href": "http://domain.com/cars/30a989afc82c0a211/lock/invoke" },
...
},
"_embedded": {
"car:devices": [ ... ]
}
}

nobody leaves the cave before the end of a new dawn https://gist.github.com/dualyticalchemy

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store