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 billing plan to the user group.

To edit a user group, use the following request:

PUT /user_groups/:id.xml
PUT /user_groups/:id.json


XML Request Example

curl -i -X PUT -u user_email:api_key --url http://onapp.test/user_groups/367.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<user_group><label>TEST_EDIT</label><role_ids type="array"><role_id>1</role_id><role_id>3</role_id></role_ids><user_bucket_ids type="array"><user_bucket_id>2</user_bucket_id></user_bucket_ids></user_group>'


JSON Request Example

curl -i -X PUT -u user_email:api_key --url http://onapp.test/user_groups/368.json -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"user_group": {"label": "test", "role_ids": [2, 3], "user_bucket_ids": [2]}}'


Where:

label - the name of the user group

role_ids - an array of IDs of the roles you assign to the user group

user_bucket_ids - an array of IDs of the user buckets you assign to the user group