PresenceService
From OpenSimulator
Contents |
Introduction
The OpenSimulator presence service stores session information for online users.
TODO: Document remaining operations: login (simulators only), logout (simulators only), logoutregion (simulators only), report (simulators only), getagent (which is like getagents but confusingly requires a session id instead of a user id).
API
Calls
getagents
This returns session information about a given set of users for each online user. POST field is a urlencoded string like so
METHOD=getagents&uuids[]=e4f3924a-5a7c-4e1a-bee7-aa96580f2515&uuids[]=e92bcf57-00e3-44b1-9e3b-586bfdcac4c3
where
- uuids[] are the UUIDs of the users to query. If there is more than one user, then each must be in a separate uuids[] param as shown above. In this case we are asking for details on two users, e4f3924a-5a7c-4e1a-bee7-aa96580f2515 and e92bcf57-00e3-44b1-9e3b-586bfdcac4c3
- METHOD is the XMLRPC method, in this case "getagents".
If no online users were found, return is
<?xml version="1.0"?> <ServerResponse> <result>null</result> </ServerResponse>
If online users were found, then an example return is
<?xml version="1.0"?> <ServerResponse> <presence0 type="List"> <UserID>e4f3924a-5a7c-4e1a-bee7-aa96580f2515</UserID> <RegionID>aaaaaaaa-bf88-45ac-aace-35bd76426c81</RegionID> </presence0> <presence1 type="List"> <UserID>e92bcf57-00e3-44b1-9e3b-586bfdcac4c3</UserID> <RegionID>aaaaaaaa-bf88-45ac-aace-35bd76426c81</RegionID> </presence1> </ServerResponse> <source> Each presence element has its index number appended (e.g. presence1 for the second user). User ID is listed and the RegionID that the user is in.