Category Filter
Add/Remove Users
Add or remove users to/from a user group.
Arguments | Type | Description |
---|---|---|
add_users | Integer array | Required. An array of user IDs to be added into the group |
remove_users | Integer array | Required. Array of user IDs to be removed from the group |
NOTE: If add_users and remove_users contain the same IDs, then those IDs will be added to the group.
curl
HTTP Request:
Shell Command:
1 2 3 4 5 6 7 8 9 |
POST https://<portal>.hexnodemdm.com/api/v1/usergroups/{USERGROUP_ID}/ headers:- Authorization: <api key> Content-Type: application/json Sample Post Data:- [{ "add_users":[1,2,3], "remove_users":[4], }] |
Shell Command:
1 |
curl -H "Authorization:<your API key>" -H "Content-Type: application/json" -d '{ "add_users":[1,2,3],"remove_users":[4]}' https://<portal>.hexnodemdm.com/api/v1/usergroups/{USERGROUP_ID}/ |
HTTP Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
HTTP_201_CREATED { "id": 6, "groupname":"example" , "description":"ios usergroup", "users":[ { "id": 1, "name":"neil" "email":"neil@hexnode.com", "domain": "local", "phoneno": "18664989407" }, ... ] |