VMware {code} Community
StanleyYau
Contributor
Contributor

How do I create an organization by Linux Script?


I have already got the token from the vCloud director and save it into the cookie file.


so I have the parameter call authheader to recall the token which is $authheader.


Here is my script:


curl -i -k -H "Accept:application/*+xml;version=1.5" \


-H "$authheader" \


-H "Content-type:application/vnd.vmware.admin.organization+xml" \


-X POST https://vcloud.example.com/api/admin/orgs \


-d @$user/create_org.xml


But the result is 400 bad request...


However, my content of xml is correct because I tried to create an organization from RESTClient and is was created successfully.


Please help me to identify the problem. Thank You.

0 Kudos
0 Replies