Add User Group

To create a user group, use this request:

1
2
POST /user_groups.xml
POST /user_groups.json

XML Request Example

1
curl -i -X POST http://onapp.test/user_groups.xml -d '<!--?xml version="1.0" encoding="UTF-8"?--><user_group><label>TEST_XML</label><bucket_id>1</bucket_id><user_bucket_ids type="array"><user_bucket_id>1</user_bucket_id></user_bucket_ids><assign_vcloud_roles>false</assign_vcloud_roles><role_ids type="array"><role_id>1</role_id></role_ids></user_group>' -u user_email:api_key -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

1
curl -i -X POST http://onapp.test/user_groups.json -d '{"user_group":{"label":"TEST_JSON","bucket_id":1,"user_bucket_ids":[1],"assign_vcloud_roles":0,"role_ids":[1]}}' -u user_email:api_key -H 'Accept: application/json' -H 'Content-type: application/json'

Where:

label - the name of the user group

bucket_id - the ID of the bucket you assign to this user group

user_bucket_ids - an array of IDs of the user buckets that will be available to the users of this user group

assign_vcloud_roles - set true for the default VMware Cloud Director roles to be automatically assigned to the user group; otherwise, set false

role_ids - an array of IDs of the roles that will be assigned to the user group. This parameter does not apply when the assign_vcloud_roles parameter is set to true.

Page History

v.6.0

  • Replaced
    • user_bucket_id with bucket_id
    • bucket_ids with user_bucket_ids