Application Programming Interface Guide > Web Services Operations > Operations Reference > destroyResource
 
destroyResource
Destroy a resource and all resources that might be in that container as well. The force element defines the behavior for containers. If force is FALSE, no resources are destroyed unless all resources within the container can be destroyed. If force is TRUE, as many resources are destroyed as possible, but if any resource cannot be destroyed, its container is not destroyed, either.
Location
/services/webservices/system/admin/resource/operations/
Request Elements
path: A source path of the resource to be destroyed.
type: The type of the source resource to be destroyed.
force: If TRUE, attempt to destroy as many resources as possible. If FALSE, do not destroy any resource if there exists at least one that is not destroyable.
Response Elements
destroyedAll: If TRUE, all of the resources were completely destroyed, including the contents of containers; otherwise FALSE.
Faults
IllegalArgument: If the path or type is malformed.
IllegalState: If the resource is not allowed to be destroyed.
NotFound: If the resource or any portion of the path does not exist.
Security: If the user does not have READ access on all items in path other than the last one.
Security: If the user does not have WRITE access to the resource.
Security: If force is FALSE and the resource is a container and the user does not have WRITE access to any resource within the container.
Security: If the user does not have the ACCESS_TOOLS right.