AvatarService

=Introduction=

The OpenSimulator avatar service stores user avatar parameters (height, visual parameters) and items that are attached and provides this on request.

TODO: Document remaining operations.

=API=

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

getavatar
This returns data about a user's avatar. POST field is a urlencoded string like so

VERSIONMIN=0&VERSIONMAX=0&UserID=efc1b932-20e3-4298-8824-0f891fe3dc59&METHOD=getavatar

where


 * VERSIONMIN is the minimum version client protocol compatible with this request. Currently unused, can set to zero.
 * VERSIONMIN is the maximum version client protocol compatible with this request. Currently unused, can set to zero.
 * UserID is the UUID of the avatar.
 * METHOD is the XMLRPC method, in this case "getavatar".

If successful, example return is

where


 * MAXVERSION can be ignored - this is accidentally being stored and retrieved on OpenSimulator 0.7.4 and before.
 * MINVERSION can be ignored - this is accidentally being stored and retrieved on OpenSimulator 0.7.4 and before.
 * METHOD can be ignored - this is accidentally being stored and retrieved on OpenSimulator 0.7.4 and before.
 * UserID can be ignored - this is accidentally being stored and retrieved on OpenSimulator 0.7.4 and before. If it is present it will be the same as the requested UserID.
 * AvatarType is the type of avatar. This can currently be ignored and will always be 1 for real avatars.
 * AvatarHeight is the height of the avatar in meters.
 * Serial is the serial number of the avatar parameters update.
 * VisualParams is a comma separated list of integers that control aspects of the avatars appearance.
 * Wearable_x0020_AvatarWearable_x003A_0> is an entry that controls the items that the avatar is wearing. The data is in the format :.  In the element format, AvatarWearable corresponds to the wearable type in OpenMetaverseTypes.WearableType.  For instance, 2 is hair and 4 is shirt.
 * _ap_attachment-point-number corresponds to an attachment. The data here is just the inventory id.  In the element format, attachment-point-number corresponds to OpenMetaverseTypes.AttachmentPoint.  In this case 32, is AttachmentPoint.HUDTopRight.  If there are no attachment then there will be no such elements.

=Data Storage=

The underlying data storage for the Avatar service is a name:value table where the columns are

+-+-+--+-+-+---+ +-+-+--+-+-+---+ +-+-+--+-+-+---+
 * Field      | Type        | Null | Key | Default | Extra |
 * PrincipalID | char(36)   | NO   | PRI | NULL    |       |
 * Name       | varchar(32) | NO   | PRI | NULL    |       |
 * Value      | text        | YES  |     | NULL    |       |

The PrincipalID corresponds to the user ID. The Name and Value pairs can be the following.