RESTful web service, PUTting an unnamed resource?
- by James L
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?