This API has a deprecated equivalent from v7.0U1.
Delete Datacenter
DescriptionDelete an empty datacenter from the vCenter Server
Request
URLURL
https://{api_host}/api/vcenter/datacenter/{datacenter}
Path Parameters
Path Parameters
string
datacenter
Required
Identifier of the datacenter to be deleted.
The parameter must be an identifier for the resource type: Datacenter.
Query Parameters
Query Parameters
boolean
force
Optional
If true, delete the datacenter even if it is not empty.
If unset a ResourceInUse error will be reported if the datacenter is not empty. This is the equivalent of passing the value false.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
cURL Command
curl -X DELETE -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/api/vcenter/datacenter/{datacenter}
Errors
400
com.vmware.vapi.std.errors.resource_in_use : if the datacenter associated with datacenter is not empty.
403
com.vmware.vapi.std.errors.unauthorized : if the user doesn't have the required privileges.
404
com.vmware.vapi.std.errors.not_found : if there is no datacenter associated with datacenter in the system.
500
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request.
503
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
Availability
Added in 7.0U2