CalGroups Web Services (API) Integration Guide
Table of Contents
1. Web Services Account
Contact calnet-admin@berkeley.edu to request a web services account.
2. General Information
- Server Domain Names:
- Test: https://group-test.berkeley.edu
- Production: https://calgroups.berkeley.edu
- URI Structure:
/grouper/servicesRest/json/v2_2_100/(groups|stems)/(group|stem name) - Headers:
Content-Type: text/x-json - Authentication: Basic HTTP Authentication. Ensure the API account has admin access to your groups/folders by adding it to the folder's admin group.
- Official Documentation: Grouper Web Services Reference
3. Membership Methods
Add Member (Single UID)
Reference: Add Member Sample
Add Group as a Member (Using UUID)
Add Multiple Members
Use person UID or group UUID as subjectId. Replace membership by setting replaceAllExisting to T.
Body:
{
"WsRestAddMemberRequest":{
"replaceAllExisting":"F",
"subjectLookups":[
{"subjectId":"212374"},
{"subjectId":"c466a9d915044c72a67e8999f2d3ce4b"},
{"subjectId":"212375"}
]
}
}
Delete Member
Get Members (List all members of a group)
Get Groups (List all groups for a specific UID)
Has Member (Verify if UID is in group)
4. Group and Stem Management
Group Save (Create Group)
Group Delete
Stem Save (Create Folder)
Find Groups
Find all groups under a specified stem:
Create a Composite Group
"wsGroup":{
"description":"my composite group description",
"detail":{
"compositeType":"intersection",
"hasComposite":"T",
"leftGroup":{"name":"edu:berkeley:official:employees:all-emp"},
"rightGroup":{"name":"edu:berkeley:app:someapp:my-adhoc-group"}
},
"name":"edu:berkeley:app:someapp:my-composite-group"
}
5. Provisioning Attributes
Use these methods to add or remove sync attributes for Google (bConnected), LDAP, or AD. The values for valueSystem are: bConnected, LDAPBerkeleyIMO, or AD.
Add Provisioning Attributes
Body Example (Sync to Google):
{ "WsRestAssignAttributesBatchRequest": {
"wsAssignAttributeBatchEntries": [
{ "wsOwnerGroupLookup": { "groupName": "edu:berkeley:org:testorg:testgroupname" },
"attributeAssignType": "group",
"attributeAssignOperation": "add_attr",
"wsAttributeDefNameLookup": { "name": "etc:provisioning:provisioningMarker" }
}
]
}}
Remove Provisioning Attributes
Body: { "WsRestAssignAttributesLiteRequest":{ "attributeAssignOperation":"remove_attr", ... }}
6. Support
Request access to a folder space using the CalGroups Service Request form.
If you have questions about CalGroups or the API, contact: calnet-admin@berkeley.edu.