Create Organization

To create a new organization, use the following request:

1
2
POST /organizations.xml
POST /organizations.json

XML Request Example

1
curl -i -X POST http://onapp.test/organizations.xml -d '<!--?xml version="1.0" encoding="UTF-8"?--><vcloud_organization><label>TEST_XML</label><user_group_id>1</user_group_id><hypervisor_id>1</hypervisor_id><create_user_group>false</create_user_group><user_bucket_id>1</user_bucket_id></vcloud_organization>' -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

1
curl -i -X POST http://onapp.test/organizations.json -d '{"vcloud_organization":{"label":"TEST_JSON","user_group_id":1,"hypervisor_id":1,"create_user_group":0,"user_bucket_id":1}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

Where:

label* - the name of the organization. Can contain only alphanumeric characters or one of the following characters: [ -], [ _ ], [ . ], [ ( ], [ ) ], [ ,], [ $ ].

user_group_id - the user group with which this organization is to be associated. This parameter applies only if you disable the create_user_group parameter.

It is required to indicate either the user_group_id or the create_user_group parameter.

hypervisor_id* - the VCD compute resource with which the new organization is to be associated

create_user_group - whether you wish to create a new user group with which this organization will be associated. If you enable this option, a new user group with the label of this organization will be created and will contain this organization. If you do not enable this option, you can associate this organization with an already existing user group. To enable set to ‘1’, otherwise, set to ‘0’.

user_bucket_id - the bucket for the user group that is to be created once to create this organization. If not set, the first available company billing plan is selected. This parameter applies only if you disable the create_user_group parameter.