Delete Files (v2)

This REST API deletes a file from the repository. This topic describes the simplified v2 version of this REST API. This version contains all parameters in the payload and does not require URL encoding while calling the REST APIs. This makes the v2 API easier to use. This API is backwards compatible.

Filenames that use a backslash \ as path separators must be handled using escape characters, for example, using \\ as the value for \ (the file separator). For a file named inbox\file1.csv, pass it as inbox\\file1.csv.

For more information on deleting files, see EPM Automate Commands in Working with EPM Automate.

Required Roles

Service Administrator

Any predefined role and the Migrations – Administer granular role

REST Resource

DELETE /interop/rest/v2/files/delete

Request

Supported Media Types: application/json

Table 9-28 Parameters

Name Description Type Required Default
fileName Application snapshot name that needs to be deleted Payload Yes None

Response

Supported Media Types: application/json

Table 9-29 Parameters

Parameters Description
Details Published if there is an error with the error string
Status See Migration Status Codes
Links Detailed information about the link
Href Links to the API call
Action The HTTP call type
Rel Possible value: self
Data Parameters as key value pair passed in the request

Example of Response Body

{
	"status":0,
	"links":[{
		"data":null,
		"action":"DELETE",
		"rel":"self",
		"href":"https://<BASE-URL>/interop/rest/v2/files/delete"
	}],
	"details":null
}

Sample cURL command

curl -X DELETE -s -u '<USERNAME>:<PASSWORD>' -o response.txt -D respHeader.txt -H 'Content-Type: application/json' -d 
'{"fileName":"FILE_TO_BE_DELETED"}' 'https://<BASE-URL>/interop/rest/v2/files/delete'