jeudi 28 juillet 2016

What to do with atypical actions in REST?

Let's say that I'm creating a user. I would

POST http://ift.tt/1k2htjI

That user record gets created an email goes out and then I want to use the same API later to do a complete registration for that user. Registration includes, marking their email validated. Creating a blank account for them and a plethora of other setup kind of things. Let's say all that could be put in one controller. Which of these three would be RESTful still? Or acceptable?

A) REGISTER http://ift.tt/1BBzUWQ
B) POST http://ift.tt/2afjfot
C) POST http://ift.tt/2atZN48
D) POST http://ift.tt/2afiUCq

I've been doing a lot of looking into this and haven't been able to find a guiding source yet.




Aucun commentaire:

Enregistrer un commentaire