0 Replies Latest reply on May 4, 2015 3:14 AM by StanleyYau

    How do I create an organization by Linux Script?

    StanleyYau Lurker


      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.