InventoryService

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(GETROOTFOLDER)
(GETROOTFOLDER)
Line 37: Line 37:
 
</ServerResponse>
 
</ServerResponse>
 
</pre>
 
</pre>
 +
 +
where
 +
 +
* '''ParentID''' is the parent folder ID.  Since this is the root folder this is always UUID.Zero (00000000-0000-0000-0000-000000000000).
 +
* '''Type''' is the type of the folder.  See the InventoryType enum in [https://github.com/openmetaversefoundation/libopenmetaverse/blob/master/OpenMetaverseTypes/Enums.cs libopenmetaverse] for more details.  In this case, the type will always be 9 (RootCategory) since this is the root folder.
 +
* '''Version''' is the version of the folder.  This is used for viewer inventory caching purposes.
 +
* '''Name''' is the name of the folder.
 +
* '''Owner''' is the UUID of the avatar that owns the folder (this will always match the PRINCIPAL in our request).
 +
* '''ID''' is the unique id of the folder itself.

Revision as of 14:35, 12 September 2012

Contents

Introduction

The OpenSimulator inventory service stores user inventory data (object items, notecard items, folders, etc.) and provides this on request. Note that every inventory item points towards an immutable asset entry that actually contains the data.

The current default ROBUST OpenSimulator inventory service is known as the XInventoryService.

API

General notes

Unlike the asset service, the xinventory service is an RPC interface. Therefore it exposes only one URI which is xinventory (e.g. http://localhost:8003/xinventory). The invocation of different operations (e.g. add item, get item) is controlled via a METHOD parameter.

GETROOTFOLDER

This returns data about a user's root folder (i.e. their "My Inventory" folder"). POST field is a urlencoded string like so

PRINCIPAL=efc1b932-20e3-4298-8824-0f891fe3dc59&METHOD=GETROOTFOLDER

where

  • METHOD is GETROOTFOLDER
  • PRINCIPAL is the UUID of the user

If successful, example return is

<?xml version="1.0"?>
<ServerResponse>
  <folder type="List">
    <ParentID>00000000-0000-0000-0000-000000000000</ParentID>
    <Type>9</Type>
    <Version>1</Version>
    <Name>My Inventory</Name>
    <Owner>efc1b932-20e3-4298-8824-0f891fe3dc59</Owner>
    <ID>035f457b-a0f6-4580-a10c-e4f908e176ac</ID>
  </folder>
</ServerResponse>

where

  • ParentID is the parent folder ID. Since this is the root folder this is always UUID.Zero (00000000-0000-0000-0000-000000000000).
  • Type is the type of the folder. See the InventoryType enum in libopenmetaverse for more details. In this case, the type will always be 9 (RootCategory) since this is the root folder.
  • Version is the version of the folder. This is used for viewer inventory caching purposes.
  • Name is the name of the folder.
  • Owner is the UUID of the avatar that owns the folder (this will always match the PRINCIPAL in our request).
  • ID is the unique id of the folder itself.
Personal tools
General
About This Wiki