<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pquirk</id>
		<title>OpenSimulator - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pquirk"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Special:Contributions/Pquirk"/>
		<updated>2026-05-09T14:14:20Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/wiki/ModRex</id>
		<title>ModRex</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/ModRex"/>
				<updated>2009-04-04T21:43:08Z</updated>
		
		<summary type="html">&lt;p&gt;Pquirk: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This software is still pre-alpha. Don't use it, unless you don't mind compiling/debugging it yourself''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
[[image:modrex.jpg|250px|thumb|left|ModRex with mesh support, running on Linux]]&lt;br /&gt;
ModRex is a joint effort between RealXtend and OpenSim developers to make it&lt;br /&gt;
possible to join the RealXtend viewer to the OpenSim codebase. The RealXtend&lt;br /&gt;
viewer employs the open source [http://www.ogre3d.org OGRE game engine]&lt;br /&gt;
and differs from the Linden Lab viewer (LLviewer) in several ways. The most distinct&lt;br /&gt;
difference is in the new rendering potential offered by OGRE. When using&lt;br /&gt;
RealXtend as a viewer for OpenSim, one obtains real-time shadows, improved&lt;br /&gt;
lighting simulation, and more importantly, the [http://www.youtube.com/watch?v=yEXqiv2_kbE&amp;amp;feature=channel_page OGRE mesh]. The mesh is hierarchical&lt;br /&gt;
(multiple meshes and sub-meshes) and can include a skeleton for defining avatar motion and dynamics.&lt;br /&gt;
&lt;br /&gt;
ModRex is important to the OpenSim community mainly because, like the base&lt;br /&gt;
opensim code base itself, the RealXtend viewer is open source and breaks away&lt;br /&gt;
from some of the key contraints imposed by the LLviewer, such as inability to&lt;br /&gt;
create meshes, shadows, realistic avatars, and advanced lighting effects. ModRex&lt;br /&gt;
while not part of the viewer, is the glue that connects the viewer to the opensim&lt;br /&gt;
trunk code.&lt;br /&gt;
&lt;br /&gt;
and a  to illustrate some of the mesh and lighting effects in the viewer:&lt;br /&gt;
&lt;br /&gt;
To use ModRex, you need the following: &lt;br /&gt;
* [http://www.realxtend.org/page.php?pg=downloads RealXtend viewer]&lt;br /&gt;
* [http://forge.opensimulator.org/gf/project/modrex/ ModRex]&lt;br /&gt;
* [OpenSim-SVN (rev. 8814+)&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://forge.opensimulator.org/gf/project/modrex/ Source Code]&lt;br /&gt;
* [http://rexdeveloper.org/wiki/index.php?title=Features_supported_currently ModRex Features/Status]&lt;br /&gt;
* [http://www.realxtend.org Main RealXtend]&lt;br /&gt;
* [http://rexdeveloper.org/wiki/index.php?title=Main_Page Rex Developer]&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
===Linux===&lt;br /&gt;
 mkdir /opt/opensim opt/opensim/simulator /opt/opensim/authentication /opt/opensim/avatarstorage /opt/opensim/builds&lt;br /&gt;
 cd /opt/opensim/builds/8800&lt;br /&gt;
 svn co http://opensimulator.org/svn/opensim/trunk . &lt;br /&gt;
 sh runprebuild.sh&lt;br /&gt;
 nant&lt;br /&gt;
 mkdir modrex&lt;br /&gt;
 cd modrex&lt;br /&gt;
 svn checkout http://forge.opensimulator.org/svn/modrex/trunk .&lt;br /&gt;
 mono ../../bin/Prebuild.exe /target nant&lt;br /&gt;
 nant&lt;br /&gt;
 cp -R /opt/opensim/builds/8800/modrex/ModularRex/RexParts/RexPython/Resources/* /opt/opensim/builds/8800/bin/ScriptEngines&lt;br /&gt;
 cd /opt/opensim/builds/8800/bin&lt;br /&gt;
 cp OpenSim.ini.example OpenSim.ini&lt;br /&gt;
* edit OpenSim.ini, and add this:&lt;br /&gt;
 ;This goes under [startup]&lt;br /&gt;
 rex_python = true&lt;br /&gt;
 ;disable the default eventqueue&lt;br /&gt;
 EventQueue = false&lt;br /&gt;
 ;This goes where the physics are setup&lt;br /&gt;
 physics=RexOpenDynamicsEngine&lt;br /&gt;
 [realXtend]&lt;br /&gt;
 RexEventQueue = true&lt;br /&gt;
 enabled = true&lt;br /&gt;
 db_connectionstring = &amp;quot;MySQLDialect;MySqlDataDriver;Data Source=localhost;Database=opensim;User ID=root;Password=mypw;&amp;quot;&lt;br /&gt;
* Copy the modrex enabled OpenSimulator to the production dir&lt;br /&gt;
 cp -R /opt/opensim/builds/8800/bin/* /opt/opensim/simulator&lt;br /&gt;
* Add the [[rex mysql]] tables to the opensim database&lt;br /&gt;
* Download and build the authentication service&lt;br /&gt;
 svn co https://realxtendserver.svn.sourceforge.net/svnroot/realxtendserver/authentication/tags/0.4 /opt/opensim/authentication&lt;br /&gt;
 cd /opt/opensim/authentication&lt;br /&gt;
 mono bin/Prebuild.exe /target nant&lt;br /&gt;
 nant&lt;br /&gt;
* Create a mysql database &amp;quot;authentication&amp;quot;&lt;br /&gt;
 cd bin&lt;br /&gt;
 mono Authentication.exe &lt;br /&gt;
* Setup authentication&lt;br /&gt;
 MySql_SqlHandler.dll (or SQLite_SqlHandler.dll. MySql_SqlHandler.dll gives not implemented messages but seems to work ok)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(AuthenticationEngine=AuthenticationEngine.dll)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(logging enabled=False)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(def. region x 1000)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(def. region y 1000)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(avatarstorageurl 172.16.1.65:10000)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(default gridurl 172.16.1.65:9000)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(default dns)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(dbserver 127.0.0.1)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(dbname authentication)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(dbuser root)&lt;br /&gt;
 *******(dbpw for root)&lt;br /&gt;
 172.16.1.65 (httpsettings LAN-IP)&lt;br /&gt;
''The authentication daemon should run by now''&lt;br /&gt;
* Create a user in the authentication screenconsole&lt;br /&gt;
 create user&lt;br /&gt;
&lt;br /&gt;
* Download and build the avatarstorage service&lt;br /&gt;
 svn co https://realxtendserver.svn.sourceforge.net/svnroot/realxtendserver/avatarstorage/tags/0.4 /opt/opensim/avatarstorage&lt;br /&gt;
 cd /opt/opensim/avatarstorage&lt;br /&gt;
 bin/Prebuild.exe /target nant&lt;br /&gt;
 nant&lt;br /&gt;
* Create a database &amp;quot;avatarstorage&amp;quot;&lt;br /&gt;
 cd bin&lt;br /&gt;
 mono AvatarStorage.exe&lt;br /&gt;
* Setup avatarstorage&lt;br /&gt;
 MySql_SqlHandler.dll&lt;br /&gt;
 &amp;lt;enter&amp;gt;(AuthenticationEngine.dll)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(Inventory True)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(PersonalInventoryService.dll)&lt;br /&gt;
 PersonalInventory.SQLITE.dll&lt;br /&gt;
 &amp;lt;enter&amp;gt;(logging_enabled False)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(dbserver 127.0.0.1)&lt;br /&gt;
 avatarstorage (dbname)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(dbuser root)&lt;br /&gt;
 ********(dbpw root)&lt;br /&gt;
 172.16.1.65 (httpsettings LAN-IP)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(http port 10000)&lt;br /&gt;
 &amp;lt;enter&amp;gt;(ssl False)&lt;br /&gt;
''The avatarstorage daemon should run by now''&lt;br /&gt;
* You can use this [[rex serverscript]] to manage and start the services(uses screen)&lt;br /&gt;
Most important screen-commands are:&lt;br /&gt;
 screen -list (shows screen sessions)&lt;br /&gt;
 screen -r screenname (attaches to the screensession)&lt;br /&gt;
 ctrl-a + d (detaches from the screensession)&lt;br /&gt;
&lt;br /&gt;
the 'Account' part is the first part in your rex-username(account@myauthenticationdaemonuri)&lt;br /&gt;
* Check in the Simulator console if everything started the way it's supposed to&lt;br /&gt;
&lt;br /&gt;
''Once the three services are running, an initial user was made, fire up the realXtend client from [[RealXtend_Viewer_Linux|wine]] and login with your credentials.''&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
The following procedure is used to set up modrex:&lt;br /&gt;
&lt;br /&gt;
* Modrex uses the latest subversion (latest build) of OpenSim. Download opensim using svn checkout of the trunk code. This procedure used Microsoft Visual C# 2008. To differentiate the checkout from other opensim builds that you may have, call it opensim_modrex, for example. Then, you will remember that this build requires the RealXtend viewer. We'll assume you have your opensim implementation stored in C:\opensim_modrex.&lt;br /&gt;
* Prebuild (i.e., running Prebuild2008) and compile as you would do normally just to make sure that this build of opensim is executing. Start up opensim and make sure that you can view the region using the LLviewer.&lt;br /&gt;
* Create a new folder such as C:\modrex, and then get the latest version of modrex into this folder. Modrex is obtained using a version of svn, such as TortoiseSVN. The checkout URL is http://forge.opensimulator.org/svn/modrex. You will need to enter &amp;quot;anonymous&amp;quot; when asked to check out modrex. Make note of the revision of modrex after all files have been downloaded, just for reference in case you encounter difficulties and need to report a concern or bug.&lt;br /&gt;
* Copy the folders located in C:\modrex\trunk to C:\opensim_modrex\opensim&lt;br /&gt;
* Run the prebuild (if using VC # 2005) or prebuild2008 (if using VC# 2008) that is now located  under C:\opensim_modrex\opensim\ModularRex.&lt;br /&gt;
* Go to your c:\opensim_modrex, launch VC# on the OpenSim solution, and enter 3 projects to the existing OpenSim solution (right-mouse click on the solution name, Add-&amp;gt;Existing Project): ModularRex (found in C:\opensim_modrex\opensim\ModularRex), ModularRex.Nhibernate (found in C:\opensim_modrex\opensim\ModularRex\Nhibernate), and ModularRex.RexFramework (found in C:\opensim_modrex\opensim\ModularRex\RexFramework).&lt;br /&gt;
* Re-build the opensim solution. There should not be any errors. This, in turn, will add new region modules especially for the RealXtend viewer/OpenSim connection inside of C:\opensim_modrex\bin.&lt;br /&gt;
* Make sure to copy OpenSim.ini.example to OpenSim.ini. Inside of this new ini file (c:\opensim_modrex\bin\OpenSim.ini), add the following section: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[realXtend]&lt;br /&gt;
db_connectionstring = &amp;quot;SQLiteDialect;SQLite20Driver;Data Source=RexObjects.db;Version=3&amp;quot;&lt;br /&gt;
# Assuming you are running modrex ver 99 or later, add the following and turn off the OpenSim EventQueue &lt;br /&gt;
RexEventQueue=True&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the [Startup] section, set EventQueue=False&lt;br /&gt;
&lt;br /&gt;
* We are almost ready to run the viewer, except that the current incarnation of modrex requires authentication and avatar storage to be run separately in addition to opensim. Therefore, the way to run modrex, is to (1) Start the Authentication server, (2) Start the Avatar Storage server, and finally to (3) run opensim. The server is located in the general web page as the client viewer [http://realxtend.org/page.php?pg=downloads here]. This procedure was based on the latest binary server available. The  authentication server and avatar storage servers are .exe files located in the primary server download. Do not run the server, only Authentication and Avatar Storage. Use the Authentication window to add new users as required.&lt;br /&gt;
* Launch opensim.exe. This will now run opensim, access the new Modrex region modules inside of C:\opensim_modrex\bin, and start up your opensim server.&lt;br /&gt;
* Launch the RealXtend viewer and enter your username, password, and connection. Your username, in contrast to Opensim user names, will be one string such as &amp;quot;testuser&amp;quot;. If the domain of your server is myserver.com, then you log in as &amp;quot;testuser@myserver.com&amp;quot; entered in the &amp;quot;User Name&amp;quot; field. Enter the password. For &amp;quot;Connect To:&amp;quot;, enter  your server: myserver.com. Then, press &amp;quot;Connect&amp;quot; in the viewer.&lt;br /&gt;
* You should be inside of your opensim world but using the RealXtend viewer. Caveats and Bugs are located below.&lt;br /&gt;
* The RealXtend viewer can run python scripts. To enable python, first add the following line in the [startup] section of OpenSim.ini:  rex_python=true. Then, you must copy the following two directories: C:\opensim_modrex\opensim\ModularRex\RexParts\RexPython\Resources\Lib and PythonScript to C:\opensim_modrex\bin\ScriptEngines. [http://www.youtube.com/watch?v=vlTE7onElVE&amp;amp;feature=channel_page Here] is an example using a python script that postprocesses the main window rendering with OGRE-based effects.&lt;br /&gt;
* If you ever wish to use the LLviewer on the region you have created, temporarily move the RealXtend region modules under C:\opensim_modrex\bin out of there, and launch LLviewer. These modules are all prefixed with &amp;quot;ModularRex.&amp;quot;. Move the region modules back to continue with the RealXtend viewer. Note that RealXtend-specific artifacts (mesh, shadows) will not appear in LLviewer.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
* Some parts of the LLViewer interface do not yet exist in the RealXtend viewer. This is related to ModRex not allowing the viewer to set or retrieve certain data.&lt;br /&gt;
* Avatar is stored, but appearance changes only after viewer restart&lt;br /&gt;
* Inter-mesh collisions not yet implemented, although avatar w/ primitive collisions work&lt;br /&gt;
&lt;br /&gt;
==Recent Fixes==&lt;br /&gt;
* Multiregion Support&lt;br /&gt;
* NHibernate-db supports mysql, sqlite and mssql2005. Meshes are persistent&lt;br /&gt;
* Mesh collisions with primitives work&lt;br /&gt;
* Python scripting works for the most part (some functions are not working yet)&lt;br /&gt;
* Shift-copy keeps mesh as primdata&lt;br /&gt;
* OpenSim library useable now&lt;/div&gt;</summary>
		<author><name>Pquirk</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/REST</id>
		<title>REST</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/REST"/>
				<updated>2009-03-21T21:41:16Z</updated>
		
		<summary type="html">&lt;p&gt;Pquirk: /* Inventory Resource Identification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is taken from Alan M Webb's ''OpenSim REST Support'' Draft document dated 8/18/08. The information here and specification are works in progress but provide the basis for useful OpenSim integrations including content input and retrieval without direct DB access. --[[User:MoHax|MoHax]] 00:10, 10 October 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
There are a number of REST interfaces implemented within OpenSim. This document describes the work done to support specific interactions required in support of external application integration. XML is used to encode the payloads associated with these requests. The specific XML used is documented as an appendix, this is an interim specification.&lt;br /&gt;
&lt;br /&gt;
== What is REST? ==&lt;br /&gt;
&lt;br /&gt;
The notion of Representational State Transfer (REST) was introduced by Roy Fielding in his doctoral dissertation in 2000. It is essentially an architectural concept rather than a protocol, and this has led to a variety of implementations, all of which might claim to be compliant REST implementations.&lt;br /&gt;
&lt;br /&gt;
A REST interface is built upon the HTTP protocol, making use of the four principle methods defined therein: GET, PUT, POST, and DELETE. A fifth method HEAD is also supported, but that is really just a semantic variation of GET. The TRACE and OPTIONS methods have a less fundamental role. No other protocol is involved.&lt;br /&gt;
&lt;br /&gt;
Note that REST does not specify the nature of the payload either sent or received. The interface associated with this document uses XML meta-data to manage an arbitrary payload. The need for a schema document to give form to this XML will be dealt with as a separate discussion.&lt;br /&gt;
&lt;br /&gt;
Of particular significance is the understood meaning of the methods themselves, which is (and must be) as defined by the HTTP specification:&lt;br /&gt;
&lt;br /&gt;
* '''GET''' retrieves the information identified by the associated URI and returns it to the requester. GET is idempotent. If the URI identifies a process, then it is the output of that process which is returned, and not the source text of that process. GET is conditional when the headers include any of the If headers. GET is partial if a range related header is included. The results of GET may be able to be cached.&lt;br /&gt;
&lt;br /&gt;
* '''HEAD''' is functionally equivalent to GET except that the payload is not included in the response. The result of a HEAD request may be able to be cached.&lt;br /&gt;
&lt;br /&gt;
* '''POST''' requests that the server accept the payload as a new entity, subordinate to the existing entity identified by the URI. POST places requirements upon session capabilities in the server insofar as it requires persistent connection and flow control capabilities.&lt;br /&gt;
&lt;br /&gt;
* '''PUT''' indicates that the payload should be stored on the server under the resource named by the URI. If the named resource already exists, then the payload is considered to be a modified version of that resource. If the named resource does not exist, then it should be created by the server.&lt;br /&gt;
&lt;br /&gt;
* '''DELETE''' requests that the server delete the resource identified by the URI.&lt;br /&gt;
&lt;br /&gt;
Other methods (TRACE, OPTIONS, CONNECT) may be supported, but are not fundamental to the principles of REST. Use of these methods also implies specific requirements in terms of how the response codes should be used.&lt;br /&gt;
&lt;br /&gt;
== REST Inventory Support ==&lt;br /&gt;
&lt;br /&gt;
The REST support in OpenSim is separated into a number of functional components, all of which live in the OpenSim/ApplicationPlugins/Rest hierarchy.&lt;br /&gt;
&lt;br /&gt;
# Plug-in management. E.g. RestPlugin.cs and Inventory/RestHandler.cs&lt;br /&gt;
# Service management: Inventory/RestHandler.cs&lt;br /&gt;
# REST implementation: RequestData.cs, Rest.cs&lt;br /&gt;
# Service implementations: Inventory/RestInventoryServices.cs, Inventory/RestAssetServices.cs, etc.&lt;br /&gt;
&lt;br /&gt;
This separation serves a number of purposes:&lt;br /&gt;
&lt;br /&gt;
* it limits the sensitivity of each component to implementation changes in the others&lt;br /&gt;
* it simplifies the task of service implementation by “hiding” infrastructure&lt;br /&gt;
* it helps make services consistent by sharing a single implementation of REST related tasks&lt;br /&gt;
&lt;br /&gt;
The design intention is that each subdirectory in the REST hierarchy, I.e. Inventory, corresponds to a distinct REST handler assembly consisting of service management and one or more service implementations. The Inventory directory is one example of such an assembly.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Parameters ===&lt;br /&gt;
&lt;br /&gt;
In order for the REST handlers to be loaded and effective, statements must be added to the OpenSim.ini file. OpenSim reads the initialization file during start-up. This file is partitioned into various functional domains, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Startup]&lt;br /&gt;
gridmode = false&lt;br /&gt;
physics = basicphysics&lt;br /&gt;
&lt;br /&gt;
[RestPlugins]&lt;br /&gt;
enabled = false&lt;br /&gt;
&lt;br /&gt;
[RestHandler]&lt;br /&gt;
enabled = false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;RestPlugins&amp;lt;/tt&amp;gt; partition affects REST handlers in general and supports the following entries:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[RestPlugins]&lt;br /&gt;
enabled = true|false || false&lt;br /&gt;
god_key = &amp;lt;string&amp;gt; || “”&lt;br /&gt;
prefix  = &amp;lt;string&amp;gt;   || “/admin”&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only &amp;lt;tt&amp;gt;enabled=true&amp;lt;/tt&amp;gt; is necessary to enable REST processing. &lt;br /&gt;
&lt;br /&gt;
Additionally, REST inventory processing currently requires that the following partition be defined:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[RestHandler]&lt;br /&gt;
enabled = true|false || false&lt;br /&gt;
authenticate = true|false || true&lt;br /&gt;
extended-escape = true|false || true&lt;br /&gt;
realm = &amp;lt;string&amp;gt; || “OpenSim REST”&lt;br /&gt;
dump-asset = true|false || false&lt;br /&gt;
dump-line-size = int%8 || 32&lt;br /&gt;
path-fill = true|false || false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The partition name corresponds to the &amp;lt;tt&amp;gt;ConfigName&amp;lt;/tt&amp;gt; value specified in the plug-in subclass, I.e. RestHandler.cs.&lt;br /&gt;
&lt;br /&gt;
Again, only the enabled=true entry must be provided to enable the inventory handler; all other defaults are acceptable for normal operation. The meanings of these values will become apparent in the rest of the document.&lt;br /&gt;
&lt;br /&gt;
When the server starts, the REST handler will publish several messages indicating which configuration values are in effect.&lt;br /&gt;
&lt;br /&gt;
=== Effective URI ===&lt;br /&gt;
&lt;br /&gt;
From a REST perspective, the path component of the URI is viewed as a resource identification, the precise significance of which depends upon the HTTP method being used. There are subtleties here, in some cases a prefix of the path may be viewed as a functional qualification of the authority, with the remainder of the URI being a resource identification within the domain of that authority. In this document, the notion of a service corresponds to the functional qualification mechanism just described.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;prefix&amp;lt;/tt&amp;gt; value in the configuration file is used to construct the server's base prefix for REST services, as illustrated in the description of the inventory services prefix shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/admin/inventory&lt;br /&gt;
                     ^^^^^&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this URI &amp;lt;tt&amp;gt;/admin&amp;lt;/tt&amp;gt; is the base prefix, and &amp;lt;tt&amp;gt;/inventory&amp;lt;/tt&amp;gt; is a prefix extension that identifies the inventory service handler.&lt;br /&gt;
&lt;br /&gt;
All requests that have an &amp;lt;tt&amp;gt;/admin/inventory&amp;lt;/tt&amp;gt; prefix will be passed to the inventory handler. The prefix must be followed by the name of the avatar that owns the inventory in question. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://localhost:9000/admin/inventory/Alan Webb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming the GET method, then this will return Alan Webb's inventory catalog, as XML data in the response payload, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Inventory&amp;gt;&lt;br /&gt;
&amp;lt;Folder name = “My Inventory” uuid=”11111111-...-111111111111” ....&lt;br /&gt;
        &amp;lt;Folder name=”Objects” uuid=....&lt;br /&gt;
        ....&lt;br /&gt;
        &amp;lt;/Folder&amp;gt;&lt;br /&gt;
    &amp;lt;/Folder&amp;gt;&lt;br /&gt;
&amp;lt;/Inventory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case &amp;lt;tt&amp;gt;/admin/inventory&amp;lt;/tt&amp;gt; identiifes the service, and &amp;lt;tt&amp;gt;/Alan Webb&amp;lt;/tt&amp;gt; is the resource specification component of the path.&lt;br /&gt;
&lt;br /&gt;
== Implementation Overview ==&lt;br /&gt;
&lt;br /&gt;
The REST implementation being described is manifest in a subset of the files contained in the &amp;lt;tt&amp;gt;ApplicationPlugins/Rest&amp;lt;/tt&amp;gt; file hierarchy. It is logically partitioned into three domains:&lt;br /&gt;
&lt;br /&gt;
* Plugin and configuration management&lt;br /&gt;
* REST implementation services&lt;br /&gt;
* REST service providers&lt;br /&gt;
&lt;br /&gt;
The objective here being to separate functionality so that the task of the service provider is made as straightforward as possible while ensuring that all services implemented using the interface are consistent in both approach and behavior.&lt;br /&gt;
&lt;br /&gt;
[[Image:RESTOverallDataFlowModel.jpg|center|thumb|400px|Illustration 1: Overall Data Flow Model]]&lt;br /&gt;
&lt;br /&gt;
As shown in Illustration 1: Overall Data Flow Model all requests originate, and are eventually returned to, the OpenSim HTTP server. The handler is isolated from this implementation by the &amp;lt;tt&amp;gt;IHttpAgentHandler&amp;lt;/tt&amp;gt; interface and the OSHTTP data-types. After matching, the request is passed to the appropriate handler; this relationship is defined by the &amp;lt;tt&amp;gt;IRest&amp;lt;/tt&amp;gt; interface and the &amp;lt;tt&amp;gt;RequestData&amp;lt;/tt&amp;gt; data-type.&lt;br /&gt;
&lt;br /&gt;
=== Changes to BaseHttpServer ===&lt;br /&gt;
&lt;br /&gt;
The existing OpenSim HTTP server class was modified to support plug-in modules that conform to the &amp;lt;tt&amp;gt;IHttpAgentHandler&amp;lt;/tt&amp;gt; interface. Three new subroutines were added: &amp;lt;tt&amp;gt;AddHttpAgentHandler&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;RemoveHttpAgentHandler&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;TryHttpAgentHandler&amp;lt;/tt&amp;gt;; this is consistent with the way in which existing handlers are managed.&lt;br /&gt;
&lt;br /&gt;
Additionally, the &amp;lt;tt&amp;gt;HandleRequest&amp;lt;/tt&amp;gt; method was extended to include support for the &amp;lt;tt&amp;gt;IHttpAgentHandler&amp;lt;/tt&amp;gt; interface.&lt;br /&gt;
&lt;br /&gt;
The processing of existing handlers is not affected by the new support.&lt;br /&gt;
&lt;br /&gt;
=== Plugin and Configuration Management ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;IHttpAgentHandler&amp;lt;/tt&amp;gt; describes the interface between OpenSim's base HTTP server and the REST implementation, a plug-in must implement this interface. Any class that exports this interface, and that registers its handlers using the appropriate (not defined by an interface) methods in the base HTTP server can act as a handler. Note that while the usage described here is intended to support REST, the interface itself is agnostic and may be used as the basis for any HTTP request handler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;'''RestPlugin.cs'''&amp;lt;/tt&amp;gt; provides a basic agent-handling superclass. An implementation of this class represents a handler from the point of view of the base HTTP server. This class implements the &amp;lt;tt&amp;gt;IHttpAgentHandler&amp;lt;/tt&amp;gt; interface. A given implementation class need only be differentiated from the others in terms of the agent name it uses when it registers. At present, a duplicate agent (based upon supplied agent name) will not be registered; how such a failure is handled depends upon the implementation class. Aside from the name used, a given handler should be differentiated in terms of the set of request patterns that it will match; overlap is undesirable as the first match will win, and at present the order in which OpenSim loads modules is non-deterministic. The &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt; class in the Inventory sub-directory is an example of an implementation class for ''RestPlugin.cs''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;'''Inventory/RestHandler.cs'''&amp;lt;/tt&amp;gt; implements the plug-in interface described above, and also implements a local model of integrating a set of services within a single handler instance. It does this by scanning the classes included in the assembly for those that implement the &amp;lt;tt&amp;gt;IRest&amp;lt;/tt&amp;gt; interface; each such class is then initialized. This provides implementation independence from a development standpoint (adding a new service is as simple as adding a single class) whilst avoiding unnecessary overt modularization in OpenSim. This class also takes care of global configuration and initialization of the basic REST environment, i.e. It sets basic references for the OpenSim communications manager, user services, inventory services, and asset management.&lt;br /&gt;
&lt;br /&gt;
For performance reasons, and as an obligation to the &amp;lt;tt&amp;gt;IHttpAgentHandler&amp;lt;/tt&amp;gt; definition, this class also implements the Match function, using pattern information registered by the individual services when they were initialized1.&lt;br /&gt;
&lt;br /&gt;
This class contains no REST specific, or service specific functionality beyond some basic initialization. This class can be used in multiple assemblies without change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;'''Rest.cs'''&amp;lt;/tt&amp;gt; provides both state and functionality in support of the REST implementation. Most of the state is static and constant, a small set of static values are initialized by the &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt; when the plug-in is loaded. This class will only change as the REST implementation evolves and becomes more complete. I''t must not contain any service sensitive elements.'' This class may be sub-classed by a given assembly to provide global additions required by a specific set of services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;'''RequestData.cs'''&amp;lt;/tt&amp;gt; serves as a carrier for the state associated with a request. It may be sub-classed by a given service provider in order to add service specific state and functionality, for example the inventory services currently utilize an XML extension to handle inventory specific payload interpretation and generation.&lt;br /&gt;
&lt;br /&gt;
The remaining classes in the Inventory directory provide different classes of service.&lt;br /&gt;
&lt;br /&gt;
=== Adding A New REST Service To An Existing Handler ===&lt;br /&gt;
&lt;br /&gt;
The process for adding a new service is straightforward. The file &amp;lt;tt&amp;gt;RestTestServices.cs&amp;lt;/tt&amp;gt; serves as an example1 of what a new services class must minimally include. Key points to note are:&lt;br /&gt;
&lt;br /&gt;
# Each service class should have an associated value for &amp;lt;tt&amp;gt;qPrefix&amp;lt;/tt&amp;gt;. This should be unique for each service, as it represents the relative extension of the URI that will be matched by this service. The value supplied here may be absolute, but this is discouraged. The constructor will automatically update a relative value to reflect the absolute prefix set globally during initialization.&lt;br /&gt;
# In the case of test services the constructor loads a set of classes from a sub-directory, each of which represents a specific service implementation. For example, these may be method-related, or based upon other values contained in the supplied URI.&lt;br /&gt;
# The services constructor must register itself with the &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt;. It provides three values at registration time: a reference to the service method, the URI prefix that this service will match, and a reference to an &amp;lt;tt&amp;gt;RequestData&amp;lt;/tt&amp;gt; allocation method that will return an appropriately sub-classed instance of the &amp;lt;tt&amp;gt;RequestData&amp;lt;/tt&amp;gt; class.&lt;br /&gt;
# Implementation of the service and allocation methods described above must be provided.&lt;br /&gt;
&lt;br /&gt;
Other methods definitions are simply part of the overall infrastructure and would be unique to a given service implementation.&lt;br /&gt;
&lt;br /&gt;
''Note that a given services class may implement zero or more services, according to its intended function. A class providing shared functionality to other services may be loaded but not register any actual handling methods. Similarly, a single services class could register multiple handling methods.''&lt;br /&gt;
&lt;br /&gt;
== REST Implementation Classes ==&lt;br /&gt;
&lt;br /&gt;
This section provides additional documentation of the state and services provided by &amp;lt;tt&amp;gt;Rest.cs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;RequestData.cs&amp;lt;/tt&amp;gt; files.&lt;br /&gt;
&lt;br /&gt;
=== Rest.cs ===&lt;br /&gt;
&lt;br /&gt;
The eponymous class provides a collection of ''request independent'' services and state definitions. Any functions directly dependent upon the HTTP request and response elements are provided in &amp;lt;tt&amp;gt;RequestData.cs&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== State ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Log&amp;lt;/tt&amp;gt; declaration provides local access to the &amp;lt;tt&amp;gt;log4net&amp;lt;/tt&amp;gt; facility. Though apparently complex it simply resolves to a static, read-only reference that can be used to pass messages to the logging facility.&lt;br /&gt;
&lt;br /&gt;
The value of &amp;lt;tt&amp;gt;DEBUG&amp;lt;/tt&amp;gt; reflects whether or not debug messages have been enabled in the OpenSim log. If they have, then &amp;lt;tt&amp;gt;DEBUG&amp;lt;/tt&amp;gt; will be enabled, if not, then they will not. Being a static declaration it is anticipated that the JIT compiler will be able to make efficient code generation assumptions. This is only of real significance where some substantial operation is performed solely in support of debugging.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Plugin&amp;lt;/tt&amp;gt; reference is set by &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt; during initialization. It eliminates the need for a services class to have direct awareness of how it was activated. For example, this reference is used to locate the &amp;lt;tt&amp;gt;AddPathHandler&amp;lt;/tt&amp;gt; method  needed to register its interface.&lt;br /&gt;
&lt;br /&gt;
The main reference is set by the &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt; during initialization. Its value is a reference to the simulator's base class. It is provided to the plug-in interface and is stored for that reason. It is not currently used except by &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt; to locate the communications manager during initialization.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Comms&amp;lt;/tt&amp;gt; provides a globally accessible reference to the simulator's communications manager. It is initialized by &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt; during initialization and is currently only used by &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt; to locate other, commonly needed, simulator services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;InventoryServices&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;UserServices&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;AssetServices&amp;lt;/tt&amp;gt; are references to the corresponding simulator service interfaces. This list may grow as common service requirements expand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Prefix&amp;lt;/tt&amp;gt; is the common URI prefix associated with all handlers within a given assembly. In the case of inventory services it is obtained from the global REST configuration. It is currently /admin. This is a configurable attribute. Typical this should be set to whatever is considered to be the standard prefix for REST services in a given URI, it will be combined with scheme and authority information to construct a valid URL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Config&amp;lt;/tt&amp;gt; is a saved reference to the configuration file used by this assembly. The configuration partition is identified by the &amp;lt;tt&amp;gt;ConfigName&amp;lt;/tt&amp;gt; string supplied by the &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt; implementation. This is currently only used by the &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt;, but it could be used by a service implementation to access attributes unique to the service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;GodKey&amp;lt;/tt&amp;gt; is a string obtained from the configuration file which contains the password for the God user. This user has unfettered access to all administrative functions. This is a temporary mechanism and will eventually be replaced by something more secure. This is a configurable attribute.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Authenticate&amp;lt;/tt&amp;gt; indicates whether or not user authentication is required by this handler. This is a configurable attribute, true by default.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Secure&amp;lt;/tt&amp;gt; indicates whether or not the HTTP session should be secured. Secure sessions are currently not available to OpenSim. This is a configurable attribute, true by default.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ExtendedEscape&amp;lt;/tt&amp;gt; controls whether or not the URI is processed for parsing extensions such as “+” in place of spaces. This is a configurable attribute, true by default.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;DumpAsset&amp;lt;/tt&amp;gt; controls whether or not the content of an incoming asset should be dumped to the trace file after decoding has completed. This is only intended to be used when there is some indication of a problem with the decoding process. It may produce a significant amount of trace output depending upon the quantity of asset data being uploaded. This is configurable and is normally false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Fill&amp;lt;/tt&amp;gt; controls whether or not the server will automatically generate intermediate folder names when handling a POST request; it is not currently considered appropriate for PUT. This is not presently implemented.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;FlushEnabled&amp;lt;/tt&amp;gt; indicates that the server will completely flush an inbound data stream before responding. This accommodates clients that can not handle the case where a socket error is generated as a result of an early termination of the inbound data stream (due to an authentication failure for example). This mechanism is vulnerable to DOS attacks and can be selectively enabled/disabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Realm&amp;lt;/tt&amp;gt; is a string that may be used to distinguish the authentication realm associated with the handler, in place of the URI prefix. This corresponds directly to the realm token included in the WWW-Authenticate response header. This is a configurable option, and is set to 'OpenSim REST' by default. Clients may use this value to determine if additional authentication is necessary, or to select appropriate cached credentials.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;DumpLineSize&amp;lt;/tt&amp;gt; indicates the line length to use for any data dumps (e.g. &amp;lt;tt&amp;gt;DumpAsset&amp;lt;/tt&amp;gt;) during runtime. The default is 132. This is a configurable option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;statusHead&amp;lt;/tt&amp;gt; contains the standard HTML header used for reporting request status. Similarly, &amp;lt;tt&amp;gt;statusTail&amp;lt;/tt&amp;gt; is used to provide a standard suffix. These are both used by the standard status reporting mechanisms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;HttpStatusDesc&amp;lt;/tt&amp;gt; is an array which, when indexed by an appropriate HTTP status code, will return a corresponding status description.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;CreationDate&amp;lt;/tt&amp;gt; (property) provides a single consistent reference for creation data value needed when introducing new items into the inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MsgId&amp;lt;/tt&amp;gt; (property) provides a consistent message prefix for log messages generated by the handler. Although static, the value is thread specific, so it is actually unique per request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;RequestId&amp;lt;/tt&amp;gt; (property) provides a unique, monotonically incrementing request counter for processed requests.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Encoding&amp;lt;/tt&amp;gt; provides a standard encoding reference (UTF8) for all data handled by the handler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Version&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; are intended to uniquely identify the REST implementation represented by this particular class. Version information should be updated if any significant changes to the REST interface are implemented. This is not currently exploited, but should be. We should have an extended header that indicates the REST version that the client is expecting, and the Match process should be sensitive to this. In this way we can provide concurrent support for multiple REST versions.&lt;br /&gt;
&lt;br /&gt;
The extensive list of constant values are all held to be self-explanatory and should be used wheresoever the value they represent is required in a service implementation. This ensures consistency between the REST implementation and the REST service implementations.&lt;br /&gt;
&lt;br /&gt;
==== Functions ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;StringToBase64&amp;lt;/tt&amp;gt; provides a standard Base64 encoding mechanism for service implementations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Base64ToString&amp;lt;/tt&amp;gt; provides a standard Base64 decoding mechanism for service implementations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Hex2Int&amp;lt;/tt&amp;gt; provides a standard mechanism for converting a hexadecimal string of arbitrary length into an integer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Int2hex8&amp;lt;/tt&amp;gt; converts an integer into an 8 character hexadecimal number. This is not currently used, and as such should not be trusted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;NonceGenerator&amp;lt;/tt&amp;gt; is a simple nonce producer that ensures uniqueness by simply converting a newly generated UUID into a Base64 string. This function is called each time the user is called upon to authenticate, which is not necessarily that often, provided the client caches credentials based upon realm.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Dump&amp;lt;/tt&amp;gt; provides a general purpose facility for generating an interpreted hexadecimal data dump to the log file. It is currently used by the DumpAsset debug facility. But it may be used by anybody requiring such data dumping services.&lt;br /&gt;
&lt;br /&gt;
=== RequestException ===&lt;br /&gt;
&lt;br /&gt;
This class provides an extended exception that can be distinguished from regular, system generated, exceptions. A &amp;lt;tt&amp;gt;RequestException&amp;lt;/tt&amp;gt; does not indicate a programming failure, rather it indicates that the received request could not be validly processed, for example, the URI was invalid. This exception should only be used in those cases where request processing is to be immediately terminated in conjunction with normal response processing. Principally it allows the handler to differentiate between a failure in processing, which should be logged, and a normal response to an invalid request, which should not.&lt;br /&gt;
&lt;br /&gt;
=== RequestData.cs ===&lt;br /&gt;
&lt;br /&gt;
This file, and its eponymous class provides consistent support for request specific REST processing. When the &amp;lt;tt&amp;gt;RestHandler&amp;lt;/tt&amp;gt; has successfully matched a handler to a request, the registered allocate method for that service interface is called to allocate an instance of this class either directly, or  as a super class of some service specific extension. This description deals only with the base implementation.&lt;br /&gt;
&lt;br /&gt;
With a single instance of a service class per handler, it is necessary to encapsulate request/response specific data in this way. Those functions that operate over that data are included here for convenience and represent part of the previously mentioned REST implementation encapsulation.&lt;br /&gt;
&lt;br /&gt;
==== Members ====&lt;br /&gt;
&lt;br /&gt;
When an instance of this class is created, the constructor always does the following:&lt;br /&gt;
&lt;br /&gt;
# The parameters are not validated. Their validity is considered to be a precondition and as such the natural exception mechanism is an efficient and effective way to deal with invalid argument values.&lt;br /&gt;
# The supplied request and response object references are cached, as is the supplied request prefix.&lt;br /&gt;
# The effective encoding is obtained from the supplied request if possible, or the Rest default (UTF8) is applied.&lt;br /&gt;
# A lower case copy of the request method is stored.&lt;br /&gt;
# &amp;lt;tt&amp;gt;InitUrl&amp;lt;/tt&amp;gt; is called to decompose the supplied URI into its basic components: query, path, host name, and  port.&lt;br /&gt;
# &amp;lt;tt&amp;gt;InitParameters&amp;lt;/tt&amp;gt; is called to create an array of strings, each of which represents a separated portion of whatever URI remains after the handler's selection prefix is removed. This list may be empty.&lt;br /&gt;
&lt;br /&gt;
In the interests of laziness, constructor processing is kept to a minimum.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;IsAuthenticated&amp;lt;/tt&amp;gt; property checks to see if the user is currently authenticated, and if not, then invokes that authentication mechanism. This allows a service request handler so simply test this boolean and reject the request if the result is false. This is an example of a failure that should not normally be logged, as the client is expected to respond to the challenge with an appropriate set of credentials.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;PathNodes&amp;lt;/tt&amp;gt; property is an array that contains a normalized list of elements in the absolute path provided in the URI. It does not differentiate the elements.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Parameters&amp;lt;/tt&amp;gt; property is an array that contains only those URI path elements that are not a part of the service selection prefix (i.e. &amp;lt;tt&amp;gt;/admin/inventory&amp;lt;/tt&amp;gt;). This simplifies service processing by providing a prefix-independent base for request parameter indeces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Complete&amp;lt;/tt&amp;gt; allows a service provider to indicate the manner in which a request has completed. Called with no arguments, this corresponds to a status code of 200 indicating a normal completion. In many cases the service provider must necessarily indicate a more specific code. The message associated with this call may be arbitrarily complex, it is used, as-is, as the message body in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Redirect&amp;lt;/tt&amp;gt; allows a service provider to indicate that the requester should be redirected to an alternative URL. Redirection may be permanent or temporary as indicated by the boolean argument.&lt;br /&gt;
&lt;br /&gt;
Variations on &amp;lt;tt&amp;gt;Fail&amp;lt;/tt&amp;gt; allow a service to abandon request processing. This call constructs an appropriate HTTP failure response, including any specified message body, generates the response, adds request information to an instance of &amp;lt;tt&amp;gt;RestException&amp;lt;/tt&amp;gt; and finally throws the exception. It is important that a service provider allow &amp;lt;tt&amp;gt;RestException&amp;lt;/tt&amp;gt; events to pass through transparently, (i.e. re-throw any that are inadvertently trapped).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Reject&amp;lt;/tt&amp;gt; encapsulates whatever processing is appropriate for requests that attempted processing that is not implemented.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Respond&amp;lt;/tt&amp;gt; allows a service provider to generate a response and complete processing with respect to the current HTTP request and response. This call is mandatory for any request that is considered to have been processed successfully.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;AddHeader&amp;lt;/tt&amp;gt; allows a service provider to add a header to the set of response headers that will be included  when the response is finally generated. The Rest constants should be used when specifying the header name. The header value is treated as an arbitrary string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;RemoveHeader&amp;lt;/tt&amp;gt; allows a service provider to remove a header that was previously added to the response header set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;DumpHeaders&amp;lt;/tt&amp;gt; causes a list of the currently effective headers to be sent to the log. This is a DEBUG option.&lt;br /&gt;
&lt;br /&gt;
== RestInventoryServices ==&lt;br /&gt;
This file, and the classes it contains, provide a monolithic implementation of all of the services provided in support of inventory processing. If required, authentication is established before any processing of inventory data. The following abnormal completion codes may be returned:&lt;br /&gt;
&lt;br /&gt;
* 301 indicating that a permanently applicable alternative URI for a specified resource has been provided.&lt;br /&gt;
* 400 indicating a bad request. Information about the nature of the request error is included in the status information returned to the client. Currently this is textual, but when a proper schema document for the interface is established, a more quantitative status will be returned.&lt;br /&gt;
* 401 indicating that the client must authenticate.&lt;br /&gt;
* 409 indicating that an ambiguous or conflicting request was received.&lt;br /&gt;
&lt;br /&gt;
=== Inventory Resource Identification ===&lt;br /&gt;
&lt;br /&gt;
An avatar's inventory is a catalog of the assets 'owned' by the avatar; the inventory contains only of meta-data and depends upon the asset data base for whatever actual data represents the perceived content. References to inventory in this document normally refer to the meta-data rather than the content. An inventory consists of two types of element: ''folders'' and ''items''. In both cases, a given element is uniquely identified by an assigned UUID. An associated name is also provided for human convenience, but such names are not required to be unique and are insufficient to ensure an exact identification. The URI used in inventory related requests allows either UUID or name to specified for each element in a resource identification path, ''if any ambiguity arises then the request will be failed''.&lt;br /&gt;
&lt;br /&gt;
The avatar's inventory can contain a private catalog, and one or more shared, or public, catalogs. Currently only the private catalog is processed. When support for the shared catalogs is introduced it will do so by adding by prefixing any path as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/admin/inventory/shared/[&amp;lt;libname&amp;gt;]/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows all global inventory, or a specific library to be referenced.&lt;br /&gt;
For all requests, specifying an avatar name implies the private inventory.&lt;br /&gt;
In all cases, if additional path information is provided, then the root directory name may be inferred (but accepted if specified explicitly). So&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/admin/inventory/Alan Webb/My Inventory/Clothing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/admin/inventory/Alan Webb/Clothing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
are semantically equivalent. This is a convenient and harmless special case. Note that the folder names are case-sensitive. Where no additional path information is provided, as in&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/admin/inventory/Alan Webb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the root directory may still be inferred for GET and POST, but can not be allowed for PUT. PUT requires the URI to identify the element that is being updated, so inference in this case could be extremely damaging. Explicit specification of the root inventory name is therefore required for all PUT requests. Given that this is an interface normally used only by programmed clients, the additional verbosity is not expected to be an issue. If this proves to be contentious, then the only viable approach would be to drop the inference altogether.&lt;br /&gt;
&lt;br /&gt;
=== Supported Services ===&lt;br /&gt;
&lt;br /&gt;
==== GET ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;GET&amp;lt;/tt&amp;gt; allows the client to retrieve all, or some sub-tree of, the inventory associated with a specified avatar's inventory. Inventory information is returned in an XML payload. This request is guaranteed not to affect the state of the avatar's inventory. Possible normal completions are:&lt;br /&gt;
&lt;br /&gt;
* 200 indicating normal completion of the request. The payload will contain an XML representation of the avatar's inventory.&lt;br /&gt;
&lt;br /&gt;
==== PUT ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;PUT&amp;lt;/tt&amp;gt; allows a resource, explicitly nominated in the URI, to be created or replaced. I.e. the URI identifies an instance rather than a context. Possible normal completions are&lt;br /&gt;
&lt;br /&gt;
* 200 if the nominated resource was successfully updated&lt;br /&gt;
* 201 if the nominated resource was successfully created.&lt;br /&gt;
* 204 if no content change (but the resource was recognized and valid)&lt;br /&gt;
&lt;br /&gt;
==== POST ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;POST&amp;lt;/tt&amp;gt; allows a new resource to be created in the context identified by the URI. It follows from this that the resource identified by a POST request should always be a folder. Normal completions are:&lt;br /&gt;
&lt;br /&gt;
* 200 if some portion of the context was modified.&lt;br /&gt;
* 201 if the new data was entirely new.&lt;br /&gt;
&lt;br /&gt;
==== DELETE ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;DELETE&amp;lt;/tt&amp;gt; allows a named resource to be deleted. If the resource is a folder, then the entire sub-tree will be removed. Normal completion codes are:&lt;br /&gt;
&lt;br /&gt;
* 200 if the specified resource was deleted.&lt;br /&gt;
&lt;br /&gt;
Both PUT and POST allow any assets upon which the inventory catalog depends, to be included in-line with the XML catalog data.&lt;/div&gt;</summary>
		<author><name>Pquirk</name></author>	</entry>

	</feed>