Delete Files (11.1.2.3.600)
Use this REST API to delete a file from the Planning repository.
This topic describes the original version of this REST API. You can also use the simplified v2 version of the REST API. The v2 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. The v2 version is backwards compatible.
Specify the filename with path separators in percent-encoding format, for example, using
%5C as the encoded value for \ (file
separator). For a file named inbox/file1.csv, pass it as
inbox%5Cfile1.csv. If you are calling the cURL command to
trigger the REST API, you can use a backslash \ for the path
separator without URL encoding. See About EPM
Automate in Working with EPM Automate.
Required Roles
Service Administrator
Any predefined role and the Migrations – Administer granular role
REST Resource
DELETE
/interop/rest/11.1.2.3.600/applicationsnapshots/{applicationSnapshotName
Request
Supported Media Types: application/json
Table 9-26 Parameters
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
applicationSnapshotName |
Application snapshot name that needs to be deleted | Path | Yes | None |
Response
Supported Media Types: application/json
Table 9-27 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/11.1.2.3.600/applicationsnapshots/ss2"
}],
"details":null
}cURL Sample
funcDeleteFile() {
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/applicationsnapshots/$encodedFileName
funcExecuteRequest "DELETE" $url
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Deleted successfully"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}