Delete

This API deletes existing media file from Unified CVP and from all the servers where it exists.

  • If the file could not be deleted from any of the servers, the file will be treated as not deleted.

  • If the operation is repeated, if the file exists on any server, it will be deleted, otherwise "404 Not Found" response is generated.

Parameters of Media File - Delete

URL

https://<ipaddress>:8111/cvp-config /mediafile/{path}/{filename}

HTTP Method

DELETE

API Type

Asynchronous

Input/Output Format

-

Parameters

-

Example XML Request Payload

-

Response

The immediate response to Delete operation is 202 Accepted.

The response of asynchrequeststaus query is 200 OK, when the initial operation is successful.

The response of asynchrequeststaus query is 500, when any error is there in completing the deletion.

Code Snippets

Sample Java code


/**
 * Deletes the media file based on the file name and the path.
 * Media file name and path is passed as the path parameter with HTTP GET method.
*/

private static void deleteMediafileRequest() {
	Client client = getSSLClient();
	ClientFilter authFilter = new HTTPBasicAuthFilter("wsmadmin", "1234Ccbu1234");
	client.addFilter(authFilter);

	WebResource webResource = null;
	webResource = client.resource("https://<OAMP IP Address>:8111/cvp-config");

	// DELETE the request
	ClientResponse clientResponse = webResource.path("/mediafile/
<path>/<media file name>").accept(MediaType.APPLICATION_XML_TYPE).
delete(ClientResponse.class);
}

Sample Response Header

Delete operation is an asynchronous operation. The URL to retrieve the operation status is set against the location field of response header.


Response HTTP Status : 202
Response Headers : {Date=[Mon, 01 Apr 2013 20:54:04 GMT], Content-Length=[0], 
Expires=[Wed, 31 Dec 1969 16:00:00 PST], Location=[https://<OAMP IP Address>
:8111/cvp-config/asynchrequeststatus/<jobid>], Content-Type=[application/xml], 
Server=[Apache-Coyote/1.1], Pragma=[No-cache], Cache-Control=[no-cache]
}