Delete Files (v2)
The Delete Files (v2) 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 for Oracle Enterprise Performance Management Cloud.
Note: To delete files using EPM Groovy rules, use the v11.2.3.600 version of the same API instead of the v2 version.
This REST API is v2.
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management application role
REST Resource
DELETE /interop/rest/v2/files/delete
Note:
Before using the REST resources, you must understand how to access the REST resources and other important concepts. See Implementation Best Practices for EPM Cloud REST APIs. Using this REST API requires prerequisites. See Prerequisites.
Request
Supported Media Types: application/json
The following table summarizes the request parameters.
Table 9-29 Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
fileName |
Application snapshot name that needs to be deleted | Payload | Yes | None |
Example URL and Payload
https://<BASE-URL>/interop/rest/v2/files/delete
{
"fileName": "inbox/file1.csv",
}
Response
Supported Media Types: application/json
Table 9-30 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'