- Topics: Active | Unanswered
Pages: 1
Topic closed
#1 2012-08-24 08:06:19
- **_gtg_**
Get group membership
According to the Web Services documentation, to get the groups a principal is in by doing:
action=principal-list&filter-type=group&filter-is-member=true
I want to find out whether a principal is in the live-admins special group.
So I tried:
action=principal-list&filter-type=live-admins&filter-is-member=true&filter-login=foo@baa.com
But all I get back is:
<results>
<status code="invalid">
<invalid field="is-member" subcode="no-such-item" type="unavailable"></invalid>
</status>
</results>
Regardless of whether the principal is in the group or not.
Are the docs wrong or am I missing something ?
Thanks,
GTG
Offline
#2 2012-08-24 11:09:02
- **_Jorma_at_RealEyes_**
Re: Get group membership
I believe it should be filter-ismemeber=true
filter-ismember=value
Offline
#3 2012-08-26 05:01:37
- **_gtg_**
Re: Get group membership
I tried "filter-ismember" but got the same error back:
/api/xml?session=BLAH&action=principal-list&filter-type=live-admins&filter-ismember=true
<results>
<status code="invalid">
<invalid field="ismember" subcode="no-such-item" type="unavailable"></invalid>
</status>
</results>
The page at http://help.adobe.com/en_US/connect/8.0 … a_SP1.html says that the parameter is called "filter-is-member"
GTG
Last edited by **_gtg_** (2012-08-26 05:07:01)
Offline
#4 2012-08-26 05:22:11
- **_gtg_**
Re: Get group membership
I've found the answer at http://help.adobe.com/en_US/connect/8.0 … 6_SP1.html
The query is:
/api/xml?filter-email=EMAIL&group-id=54321&session=FOO&action=principal-list&filter-is-member=true
Where group-id is the principal ID of the group you want to test against.
If the user is in the group, then you get a small principal list back:
<results>
<status code="ok"></status>
<principal-list>
<principal account-id="10" has-children="false" is-hidden="false" is-primary="false" principal-id="12345" training-group-id="" type="user">
<name>Joe Bloggs</name>
<login>j.bloggs@acme.com</login>
<email>j.bloggs@acme.com</email>
<display-uid>j.bloggs@acme.com</display-uid>
<is-member>true</is-member>
</principal>
</principal-list>
</results>
If the user is not in the group, then the principal-list is empty:
<results>
<status code="ok"></status>
<principal-list></principal-list>
</results>
GTG
Offline
#5 2012-08-27 10:59:18
- **_Jorma_at_RealEyes_**
Re: Get group membership
Glad you found it. I'll have to update my documentation apparently!
Offline
Pages: 1
Topic closed