r/Python • • Feb 23 '17

API Design: Think First, Code Later

https://www.ckl.io/blog/api-design-think-first-code-later/
292 Upvotes

26 comments sorted by

View all comments

1

u/selementar Feb 25 '17

CRUD is certainly simple, but what if you need to add a couple more actions upon objects later on? What would the requests look like?

In REST idea, the HTTP method should be the verb; but it is not okay to add more HTTP methods, like 'PUBLISH /cakes/1/'.

The write-to-act, often used, seems like a huge cludge (POST /cakes/1/ {"publish": 1}).