A user group is a logical grouping of users that can be assigned privileges for files and folders. The REST API can manage user groups using the /usergroups resource. Only members of the Administrators user group can use this resource. The following sections provide an example of using each usergroups resource as a curl command.
GET usergroups
This example requests the list of user groups:
GET /ihub/v1/usergroups HTTP/1.1
host: myserver.mycompanyname.com:5000
AuthId: <authId>
This curl example requests the list of user groups in the default volume:
This curl example sends a PUT request to iHub to modify the name, e‑mail address, and members of the user group with the user group ID 200100000100 in the default volume:
curl -i http://%RESTHost%:5000/ihub/v1/usergroups/200100000100 ‑X PUT ‑H "AuthId:%RESTAuthId%" ‑d name="North America Sales" ‑d email="NAsalesadmin@mycompanynamehere.com" ‑d addUser=100100000100
DELETE usergroups/{groupId}
This example deletes the group with group ID 100000000100 when combined with a DELETE method:
DELETE /ihub/v1/users/100000000100 HTTP/1.1
Host: myserver.mycompanyname.com:5000
Content-Type: application/json; charset=utf-8
AuthId: <authId>
This curl example sends a DELETE request to iHub to delete the user group with user group ID 200100000100 in the default volume: