[Opensim-dev] RFC: RESTful dealings with regions
Sean Dague
sean at dague.net
Wed May 14 14:07:15 UTC 2008
On Tue, May 13, 2008 at 08:09:54PM +0200, Dr Scofield wrote:
> we are currently trying to figure out what the best approach for a REST
> "API" for regions is and would like to solicit comments :-)
>
> currently the idea is to have a scheme as follows:
>
> * http://opensim.foobar.org:9000/admin/regions ---
> o GET returns an array of (UUID, name, x location, y location,
> region's REST URL)
I think this should just return UUIDs Let's not overload
the list functionality with the actual data, as it may get
you much more than you care about.
> o POST would create a region
> * http://opensim.foobar.org:9000/admin/regions/4b787c46-1e3c-40ae-9494-2c924428f8e5/
> o GET would return detailed information about region
> o DELETE would delete region
> o PUT would update region information
> * http://opensim.foobar.org:9000/admin/regions/4b787c46-1e3c-40ae-9494-2c924428f8e5/name
> o GET would return name of region
> o PUT would update name of region
> o [similar for other region attributes if it makes sense]
+1, I like all of that. My only question is really why have the /admin
at all.
> current planning is to have this as an ApplicationPlugin level set of
> RestPlugins. an alternative would be to use region modules plus an
> ApplicationPlugin (for GET/POST on /admin/regions).
>
> this applies to region (meta) data. the next question would be how to
> structure this for avatar information and also for stuff like inventory:
> something along the lines below?
>
> * http://opensim.foobar.org/admin/avatars
> o GET returns list of known avatars?
> o POST creates account?
I think the right resource name here is "users" instead of "avatars"
> * http://opensim.foobar.org/admin/avatars/430f1da7-0e35-4c0f-985d-15046c077967/
> o GET returns detailed information about avatar?
> o PUT updates?
> o DELETE deletes?
> * http://opensim.foobar.org/admin/avatars/430f1da7-0e35-4c0f-985d-15046c077967/inventory/
> o GET returns inventory listing?
> o POST adds items to inventory?
> o DELETE deletes inventory items?
I think that as we dig into users -> inventory what we'll actually get
is.
/admin/avatars/430f1da7-0e35-4c0f-985d-15046c077967/inventory/ => 302 =>
/admin/inventory/XXXX-...
Which takes us into an inventory resource tree. Remember, in using REST
and HTTP you get to use all the HTTP semantics including all the 30x
redirects.
-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/20080514/22e09412/attachment-0001.pgp>
More information about the Opensim-dev
mailing list