RESTful web service, PUTting an unnamed resource?

Posted by James L on Stack Overflow See other posts from Stack Overflow or by James L
Published on 2011-01-06T09:49:31Z Indexed on 2011/01/06 9:54 UTC
Read the original article Hit count: 150

Filed under:

I have a back-end service that creates unique identifiers for resources.

The general idea is that resources are saved and versioned, so you can perform: GET http://service/sales/targets/7818181919/latest or GET http://service/sales/targets/7818181919/4 for version 4, and so on.

My question is about the most correct way to upload these resources in the first place.

How about: PUT http://service/sales/targets/ returning 303 See other /service/sales/targets/

It seems a little wrong as you should PUT and GET from exactly the same place using a resource-oriented interface, but I can't think of a better option. Any ideas?

© Stack Overflow or respective owner

Related posts about rest