Alan (12) [Avatar] Offline
#1
In "The challenge of mapping operations to HTTP verbs" you give examples of POST /orders/{orderId}/cancel and POST /orders/{orderId}/revise

This is not RESTful. See your reference [33] at the bottom:
I should stress that the RMM, while a good way to think about what the elements of REST, is not a definition of levels of REST itself. Roy Fielding has made it clear that level 3 RMM is a pre-condition of REST.


In other words, having verbs as part of URLs (nouns) is not good REST. REST explicitly only uses the HTTP methods (GET, POST, PUT, PATCH, DELETE) as the only verbs. If you want to cancel an order, PATCH it's order_status attribute, for example, or DELETE it. Basically the business functions should be side effects of a resource's value(s) changing. Your example is quite SOAPy.
ceracm (102) [Avatar] Offline
#2
I am not claiming that it is good REST design. The point of this section is "Another common REST API design problem is how to map the operations you want to perform on a business object to an HTTP verb." From what I've observed this is a common problem and that "verb-izing" resources is common solution. And, that this is a motivation for using alternatives to REST, such as gRPC or GraphQL.
Alan (12) [Avatar] Offline
#3
Agree it is a problem (and likely caused by people coming from SOAP) and hoping you will help by encouraging correct RESTful API design rather than writing off REST as a failure.
ceracm (102) [Avatar] Offline
#4
Alan wrote:Agree it is a problem (and likely caused by people coming from SOAP) and hoping you will help by encouraging correct RESTful API design rather than writing off REST as a failure.


I don't think I'm writing REST of as a failure. As I mentioned previously, the purpose of that section is to point out a commonly encountered problem.