> If I gave you three APIs that all claimed to be REST, could you make more than a few definitive claims on how they're to be consumed? The article calls it out, but let's take something common like what HTTP verb to use when updating a resource.
That is a fair request. Btw let's call this RESTful for clarity.
Let me attempt to put it in my own words. I (and I think many others) would expect a RESTful interface to be:
- oriented around a set of resources
- each resource has a unique name, typically a URL.
- Resources can be either collections or individual items
- there is a small fixed set of operations that can be performed on the resources, in particular, get, post, put, delete.
- get returns a collection on a collection resource, and a specific item on a specific item resource.
- post on a collection creates a new resource item within the collection
- put or patch rewrites the item or collection
- delete obviously deletes the item more collection
- the server does not need to record state to order to be able to serve the request, other than perhaps just enough to do authorization and Authentication.
This means that if you give me the name of a resource, I mainly know how to perform common actions upon it. Note that HATEOAS is not listed as a requirement.
I think the real problem is an overloading of terms. What many people mean by a RESTful interface is what I just listed above, which is not what Fielding had in mind with the term REST.
I think the term "misappropriation" is excessively harsh; Fielding does not own a trademark on the term REST. I would agree that clarity is very important, so I think it's better to use another term instead of rest when you mean something not precisely confined to Fielding's definition. I'm happy to use RESTful, but if there's a more common term that's fine.
If you want to specify a RESTful interface, there is OpenAPI, which will give you that information in a formalized way.