GroupsService: Difference between revisions
imported>Justincc Add skeleton for other calls |
imported>Justincc |
||
| Line 11: | Line 11: | ||
===FINDGROUPS=== | ===FINDGROUPS=== | ||
This returns groups which match a given pattern | This returns groups which match a given pattern. | ||
The POST field is a urlencoded string like so | The POST field is a urlencoded string like so | ||
| Line 19: | Line 19: | ||
* RequestingAgentID is always 00000000-0000-0000-0000-000000000000 for external calls | * RequestingAgentID is always 00000000-0000-0000-0000-000000000000 for external calls | ||
* Query is the | * Query is the pattern to match. If an empty string is given then all groups are returned. | ||
If successful, you will see a server response such as | If successful, you will see a server response such as | ||
| Line 39: | Line 39: | ||
<SearchOrder>0</SearchOrder> | <SearchOrder>0</SearchOrder> | ||
</n-1> | </n-1> | ||
</RESULT> | |||
</ServerResponse> | |||
</source> | |||
If no matching group is found, then you will receive | |||
<source lang="xml"> | |||
<?xml version="1.0"?> | |||
<ServerResponse> | |||
<RESULT>NULL</RESULT> | |||
<REASON>No hits</REASON> | |||
</ServerResponse> | |||
</source> | |||
===GETGROUPMEMBERS=== | |||
This returns settings for users that belong to a given group. | |||
The POST field is a urlencoded string like so | |||
RequestingAgentID=00000000-0000-0000-0000-000000000000&GroupID=6ed52fa7-d910-4b6f-a2a6-8c121c0561dd&METHOD=GETGROUPMEMBERS | |||
where | |||
* RequestingAgentID is always 00000000-0000-0000-0000-000000000000 for external calls | |||
* GroupID is a group UUID. | |||
If successful, you will see a server response such as | |||
<source lang="xml"> | |||
<?xml version="1.0"?> | |||
<ServerResponse> | |||
<RESULT type="List"> | |||
<m-0 type="List"> | |||
<AcceptNotices>True</AcceptNotices> | |||
<AccessToken/> | |||
<AgentID>f2f493c0-27d3-4cf2-be97-b44dfdad13b6</AgentID> | |||
<AgentPowers>349644697632766</AgentPowers> | |||
<Contribution>0</Contribution> | |||
<IsOwner>False</IsOwner> | |||
<ListInProfile>True</ListInProfile> | |||
<OnlineStatus/> | |||
<Title>Owner of group1</Title> | |||
</m-0> | |||
</RESULT> | </RESULT> | ||
</ServerResponse> | </ServerResponse> | ||
| Line 49: | Line 92: | ||
<ServerResponse> | <ServerResponse> | ||
<RESULT>NULL</RESULT> | <RESULT>NULL</RESULT> | ||
<REASON>No | <REASON>No members</REASON> | ||
</ServerResponse> | </ServerResponse> | ||
</source> | </source> | ||
| Line 58: | Line 101: | ||
===REMOVEAGENTFROMGROUP=== | ===REMOVEAGENTFROMGROUP=== | ||
===GETMEMBERSHIP=== | ===GETMEMBERSHIP=== | ||
===PUTROLE=== | ===PUTROLE=== | ||
===REMOVEROLE=== | ===REMOVEROLE=== | ||
Revision as of 22:37, 15 May 2014
Introduction
OpenSimulator both has a core groups service which is not yet enabled by default and an external XmlRpc/Flotsam groups service. This page describes the service level interface to the core groups.
API
Calls
WIP - Only a small number of possible service calls are currently described
FINDGROUPS
This returns groups which match a given pattern. The POST field is a urlencoded string like so
RequestingAgentID=00000000-0000-0000-0000-000000000000&Query=abc&METHOD=FINDGROUPS
where
- RequestingAgentID is always 00000000-0000-0000-0000-000000000000 for external calls
- Query is the pattern to match. If an empty string is given then all groups are returned.
If successful, you will see a server response such as
<?xml version="1.0"?>
<ServerResponse>
<RESULT type="List">
<n-0 type="List">
<GroupID>6ed52fa7-d910-4b6f-a2a6-8c121c0561dd</GroupID>
<Name>abc1</Name>
<NMembers>1</NMembers>
<SearchOrder>0</SearchOrder>
</n-0>
<n-1 type="List">
<GroupID>c5cd5ae2-6b06-4118-b0ed-41556c8c2fac</GroupID>
<Name>fooabcbar</Name>
<NMembers>1</NMembers>
<SearchOrder>0</SearchOrder>
</n-1>
</RESULT>
</ServerResponse>
If no matching group is found, then you will receive
<?xml version="1.0"?>
<ServerResponse>
<RESULT>NULL</RESULT>
<REASON>No hits</REASON>
</ServerResponse>
GETGROUPMEMBERS
This returns settings for users that belong to a given group. The POST field is a urlencoded string like so
RequestingAgentID=00000000-0000-0000-0000-000000000000&GroupID=6ed52fa7-d910-4b6f-a2a6-8c121c0561dd&METHOD=GETGROUPMEMBERS
where
- RequestingAgentID is always 00000000-0000-0000-0000-000000000000 for external calls
- GroupID is a group UUID.
If successful, you will see a server response such as
<?xml version="1.0"?>
<ServerResponse>
<RESULT type="List">
<m-0 type="List">
<AcceptNotices>True</AcceptNotices>
<AccessToken/>
<AgentID>f2f493c0-27d3-4cf2-be97-b44dfdad13b6</AgentID>
<AgentPowers>349644697632766</AgentPowers>
<Contribution>0</Contribution>
<IsOwner>False</IsOwner>
<ListInProfile>True</ListInProfile>
<OnlineStatus/>
<Title>Owner of group1</Title>
</m-0>
</RESULT>
</ServerResponse>
If no matching group is found, then
<?xml version="1.0"?>
<ServerResponse>
<RESULT>NULL</RESULT>
<REASON>No members</REASON>
</ServerResponse>