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 \
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.