This API enables you to delete a hierarchy permanently from vCenter Chargeback Manager.
Note: Once deleted, the hierarchy and its cost configurations cannot be retrieved.
The syntax for calling this method is:
DELETE <Base URL>/hierarchy/{hierarchyId}
A sample API call is as follows:
DELETE https://123.123.123.123/vCenter-CB/api/hierarchy/1
To call this API, you must have a role with Delete privilege on the hierarchy.
Name | Data Type | Required/Optional | Description | Sample Value |
---|---|---|---|---|
force | Boolean | Optional | If the value is true, this API removes a hierarchy even when it is not empty. Default value is false. |
true |
The API returns an XML that indicates the status of the operation.
The following table explains the error code displayed by the API.
Error Code |
Description |
VCB_ERR_INVALID_HIERARCHY_ID |
The specified hierarchy is not found in the hierarchy. |
VCB_ERR_HIERARCHY_NOT_EMPTY |
The specified hierarchy is not empty, that is, the hierarchy has children. |