Although adding /reviews/(?P<review_id>\d+)/+update/ would work (and is similar to the /delete/ that was added as part of bug 778301), we'll end up with an API that has lots of - perhaps unnecessary - verbs (delete, update etc.). We did start addressing this, removing unecessary verbs once before with bug 690551.
Basically, it would be possible for use the http methods so that:
1) GET /reviews/(?P<review_id>\d+)/ to get a review
2) PUT /reviews/(?P<review_id>\d+)/ to update a review
3) DELETE /reviews/(?P<review_id>\d+)/ to delete the review (even though we don't remove it from the DB, the resource will 404 after this action, so it's appropriate, I think?).
Just one URL, with different actions. Piston already supports this with its various methods corresponding to the http methods (GET-> read, POST -> create, PUT-> update, DELETE-> delete). See the full example at https://bitbucket.org/jespern/django-piston/wiki/Home
Although adding /reviews/ (?P<review_ id>\d+) /+update/ would work (and is similar to the /delete/ that was added as part of bug 778301), we'll end up with an API that has lots of - perhaps unnecessary - verbs (delete, update etc.). We did start addressing this, removing unecessary verbs once before with bug 690551.
Basically, it would be possible for use the http methods so that: (?P<review_ id>\d+) / to get a review (?P<review_ id>\d+) / to update a review (?P<review_ id>\d+) / to delete the review (even though we don't remove it from the DB, the resource will 404 after this action, so it's appropriate, I think?).
1) GET /reviews/
2) PUT /reviews/
3) DELETE /reviews/
Just one URL, with different actions. Piston already supports this with its various methods corresponding to the http methods (GET-> read, POST -> create, PUT-> update, DELETE-> delete). See the full example at https:/ /bitbucket. org/jespern/ django- piston/ wiki/Home
The only issue is that we'd want (1) above to be http, while the others to redirect if necessary to https, but that doesn't seem to difficult (http:// stackoverflow. com/questions/ 5834239/ need-to- redirect- apache- for-just- certain- http-methods )