OpenSimulator Internals/InventoryService
OpenSimulator Internals/InventoryService
[edit]Overview
[edit]InventoryService manages user inventory. Folder tree and item references. Permissions live here, not in the asset table.
This service is stateless and can be load-balanced across multiple ROBUST instances.
Unlike AssetService, the xinventory service is an RPC interface exposing a single URI (e.g. http://localhost:8003/xinventory). Different operations (add item, get item, etc.) are controlled via a METHOD parameter.
Inventory Item
[edit]| Field | Type | Notes |
|---|---|---|
| ID | UUID | UUID of the item |
| Name | string | |
| Description | string | May be blank |
| AssetID | UUID | UUID of the underlying asset |
| AssetType | int | See AssetType enum in libopenmetaverse |
| InvType | int | See InventoryType enum in libopenmetaverse. May differ from AssetType. |
| Folder | UUID | UUID of the containing folder |
| Owner | UUID | UUID of the owner |
| CreatorId | UUID | UUID of the creator |
| CreatorData | string | Extended creator data, used by --creators option in "save iar". May be blank. |
| CreationDate | int | Unix timestamp |
| BasePermissions | int | See PermissionMask flags enum in libopenmetaverse |
| CurrentPermissions | int | Permissions the current owner has when rezzed |
| NextPermissions | int | Permissions granted to next owner |
| EveryOnePermissions | int | Permissions anyone has when rezzed |
| GroupPermissions | int | Group permissions, if applicable |
| GroupID | UUID | UUID of group owner. UUID.Zero if none. |
| GroupOwned | bool | True if group owned |
| Flags | int | For wearables, encodes WearableType enum (see libopenmetaverse). Other uses need documentation. |
| SalePrice | int | |
| SaleType | int | See SaleType enum in libopenmetaverse |
Permissions live here, not in the asset table. The same underlying asset UUID can exist in multiple inventories with different permissions on each copy.
Inventory Folder
[edit]| Field | Type | Notes |
|---|---|---|
| ID | UUID | UUID of the folder |
| Name | string | |
| Owner | UUID | UUID of the owning avatar |
| ParentID | UUID | Parent folder UUID. UUID.Zero for root ("My Inventory") folder. |
| Type | int | See InventoryType enum in libopenmetaverse. Root folder type = 9 (RootCategory). |
| Version | int | Version counter for viewer inventory caching |
Note: where multiple folders are returned, the folder element may have an underscore and index appended (e.g. folder_0). Historical reasons.
Database
[edit]See inventoryitems and inventoryfolders tables for the full database schema.