Edit User Group
This API call allows you to edit a user group. It can also be used to assign a role and/or a bucket to the user group.
1
2
| PUT /user_groups/:id.xml
PUT /user_groups/:id.json
|
XML Request Example
1
| curl -i -X PUT http://onapp.test/user_groups/4.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user_email:api_key -d '<user_group><label>new_label</label><role_ids type="array"><role_id>2</role_id></role_ids><bucket_id>1</bucket_id></user_group>'
|
JSON Request Example
1
| curl -i -X PUT http://onapp.test/user_groups/4.json -H 'Accept: application/json' -H 'Content-type: application/json' -u user_email:api_key -d '{"user_group":{"label":"new_label","role_ids":[1],"bucket_id":[2]}}'
|
Where:
label - the name of the user group
role_ids - an array of IDs of the roles you assign to the user group
bucket_id - the ID of the bucket you assign to the user group