[Opensim-dev] RFC: RESTful dealings with regions

Dr Scofield DrScofield at xyzzyxyzzy.net
Wed May 14 14:47:17 UTC 2008


Sean Dague wrote:
> 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.
>   
yeah...was wondering about that. so we'd return region URL with is 
/regions/UUID, agree?
>   
>>           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.
>   
just wanted to avoid clashing with anything else...actually it currently 
is configurable :-)
>   
>> 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"
>   
ok.
>   
>>     * 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.
>   
nice!

thx for the feedback!

    cheers,
    dr scofield/dirk

-- 
dr dirk husemann, mathmatics and computer science, ibm zurich research lab
SL: dr scofield ---- drscofield at xyzzyxyzzy.net ---- http://xyzzyxyzzy.net/
RL: hud at zurich.ibm.com - +41 44 724 8573 - http://www.zurich.ibm.com/~hud/




More information about the Opensim-dev mailing list