7

The ThoughtWorks Technology Radar July 2014 mentions under Techniques / Trial a new trend called REST without PUT. They explain it as:

In the last radar we talked about Capturing Explicit Domain Events, putting emphasis on recording the business-meaningful events that have triggered state transitions instead of just CRUD’ing entities. REST interfaces commonly use PUT to update resource state, however it’s often better to POST to record a new event resource which captures intent. REST without PUT has a side-benefit of separating command and query interfaces and forces consumers to allow for eventual consistency.

Are there any additional resources where one can read about this? Is the term REST without PUT an idea made up by ThoughtWorks, or is this something academic, or …?

Any hints on this?

Golo Roden
  • 140,679
  • 96
  • 298
  • 425
  • 1
    https://groups.yahoo.com/neo/groups/rest-discuss/conversations/topics/2549 – Tim Oct 29 '14 at 08:27
  • Thanks for the link, but this little discussion is probably not the (single or main) reason why ThoughtWorks decided to get the term into their radar, isn't it? I would have expected something "more", something more official, …? (PS: Anyway, thanks a lot for the link, please don't get this wrong!) – Golo Roden Oct 29 '14 at 08:30
  • It's about the only thing I could find, other than ThoughtWorks own page – Tim Oct 29 '14 at 08:33
  • Interesting topic. I am sorry that I have to vote to close this off-topic question. –  Oct 29 '14 at 09:12
  • 1
    IMHO they are saying that one should stop looking behind on CRUD operations and focus on state-transitions. Then you map set of transitions to specific events. One of them is used to update entity. How it would be updated and what would be updated is decided on context of event. One need to POST event of updating instead of PUT update. BTW that solves one problem with using pure HTML in REST - HTML doesn't allow to trigger PUT or DELETE without JS. – nikita Oct 30 '14 at 06:41
  • @nikita If you turn your comment into an answer, I will accept it. – Golo Roden Oct 30 '14 at 07:59
  • 1
    Additional resources: https://www.thoughtworks.com/insights/blog/rest-api-design-resource-modeling - I read this great article once and then lost it for years, finally found it again. I've built REST APIs for years for clients and came to my own independent conclusion about REST w/o PUT before reading the TW article. I think in many situations CRUD-based APIs are perfect but in others, esp. regulated finance, REST w/o PUT is exactly what the doctor ordered: POSTED a request for ;). – Luke Puplett Oct 24 '17 at 09:24

2 Answers2

4

IMHO they are saying about that one should stop looking behind on CRUD operations and focus on state-transitions. Then you map set of transitions to specific events. One of them is used to update entity. How it would be updated and what would be updated is decided on context of event. One need to POST event of updating instead of PUT update.

BTW that solves one problem with using pure HTML in REST - HTML doesn't allow to trigger PUT or DELETE without JavaScript.

nikita
  • 2,737
  • 2
  • 20
  • 26
2

REST without PUT isn't standard; as you guessed, this is just ThoughtWorks thing.

Pankaj Jangid
  • 524
  • 3
  • 18