Delete Local Library
If vSphere APIs begin with /rest (vs /api), any maps are consumed/returned instead as arrays of objects, each containing a key and a value property field.
Deletes the specified local library. Deleting a local library will remove the entry immediately and begin an asynchronous task to remove all cached content for the library. If the asynchronous task fails, file content may remain on the storage backing. This content will require manual removal.
if you do not have all of the privileges described as follows: - The resource com.vmware.content.Library referenced by the parameter libraryId requires ContentLibrary.DeleteLocalLibrary.
Request
URLURL
https://{api_host}/rest/com/vmware/content/local-library/id:{library_id}
Parameters
Parameters
string
library_id
Required
Identifier of the local library to return.
The parameter must be an identifier for the resource type: com.vmware.content.Library.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
cURL Command
curl -X DELETE -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/rest/com/vmware/content/local-library/id:{library_id}
Errors
400
com.vmware.vapi.std.errors.invalid_element_type : if the library specified by libraryId is not a local library.
404
com.vmware.vapi.std.errors.not_found : if the library specified by libraryId does not exist.
409
com.vmware.vapi.std.errors.not_allowed_in_current_state : if the library contains a library item that cannot be deleted in its current state. For example, the library item contains a virtual machine template and a virtual machine is checked out of the library item.
On This Page
Local Library Operations
post
patch
delete