[Opensim-dev] Asset Server Rest Interface
Sean Dague
sean at dague.net
Sun Nov 4 13:12:46 UTC 2007
On Sat, Nov 03, 2007 at 07:20:51PM +0100, 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.
Yes you are right, my brain inverted those two yesterday for no
explicable reason.
> 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
I'd much rather use the pathinfo for UUID, which seems to be the favored
way of doing REST interfaces now adays.
> 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.
Fair enough.
> 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.
I'd really like to get this back into the URL itself like it was
previously. Typically params are not used in REST interfaces, with
PATHINFO being the prefered mechanism.
> Likewise there is no provisions for listing assets, as I don't think we will
> want to make that possible.
>
> /tleiades.
-Sean
--
__________________________________________________________________
Sean Dague Mid-Hudson Valley
sean at dague dot net Linux Users Group
http://dague.net http://mhvlug.org
There is no silver bullet. Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20071104/2dbf56aa/attachment-0001.pgp>
More information about the Opensim-dev
mailing list