RESTful services and update operations
Posted
by Igor Brejc
on Stack Overflow
See other posts from Stack Overflow
or by Igor Brejc
Published on 2010-02-22T09:18:05Z
Indexed on
2010/03/28
19:33 UTC
Read the original article
Hit count: 331
I know REST is meant to be resource-oriented, which roughly translates to CRUD operations on these resources using standard HTTP methods. But what I just wanted to update a part of a resource?
For example, let's say I have Payment
resource and I wanted to mark its status as "paid
". I don't want to POST
the whole Payment
object through HTTP (sometimes I don't even have all the data).
What would be the RESTful way of doing this? I've seen that Twitter uses the following approach for updating Twitter statuses:
http://api.twitter.com/1/statuses/update.xml?status=playing with cURL and the Twitter API
Is this approach in "the spirit" of REST?
UPDATE: PUT -> POST
Some links I found in the meantime:
© Stack Overflow or respective owner