[Opensim-dev] Asset Server Rest Interface

Adam Frisby adam at gwala.net
Sat Nov 3 18:34:19 UTC 2007


Just a note:

We should ditch updates - it's a security risk (ie people overwriting 
other peoples assets) and it also requires versioning which means 
proxies/caches are busted up.

Adam

Tleiades Hax wrote:

> 
>     I think that we should move to a url interface more like:
> 
>     GET /assets/by-uuid/UUID
>     DELETE /assets/by-uuid/UUID
>     POST   /assets/by-uuid/UUID - this is an update call
>     PUT /assets/new             - asset server creates new UUID, returns
>                                   object in the response stream to get
>                                   asset server allocated UUID
> 
> 
> Not that I am an expert on REST, far from it, but isn't PUT usually 
> meant for updates, and POST for create?, this link 
> <http://www.xml.com/pub/a/2004/12/01/restful-web.html>, atleast seems to 
> say so.
> 
> I think that maybe, this is better:
> GET /asset?assetid=<value>
> DELETE /asset?assetid=<value>
> PUT   /asset?assetid=<value> - this is an update call
> POST /assets/new             - asset server creates new asset
> There is really no need to have the UUID asigned by the asset server, if 
> all parties involved plays by the rules for creating uuid's there can be 
> no collision, so having the asset server create the uuid seems to be a 
> vaste of network traffic.
> 
> chages:
> renamed assets to asset, we will probably never deal with more than one 
> asset at a time.
> 
> I have killed the use of UUID as a name, I don't think that we should 
> use a datatype as a variable name.
> 
> Swapped semantics between PUT and POST.
> 
> Reduced complexity of asset creation, now an asset can be created by the 
> client, and then stored on the asset server in one transmission.
> 
> 
> 
> I have a hard time imagining that we will ever retrieve assets by any 
> other criteria than the assetid, but I have opted for the 
> "?assetid=<value>" scheme anyhow.
> 
> Likewise there is no provisions for listing assets, as I don't think we 
> will want to make that possible.
> 
> /tleiades.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev




More information about the Opensim-dev mailing list