Copy a File Between Instances (v1)
Use this API (v1) to copy a file from one environment (source) to another environment (target).
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.
This API is executed on the target environment after details are provided for the source environment from which the file is to be copied. This feature gives you flexibility in copying files from one cloud environment to another.
Prerequisites: The password of the source EPM Cloud environment must have already been encrypted using EPM Automate. The encrypted password must then be passed as one of the parameters for the Copy File REST API. See the encrypt
command in Command Reference in Working with EPM Automate for Oracle Enterprise Performance Management Cloud.
This REST API is version v1.
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management application role
REST Resource
POST /interop/rest/v1/services/copyfile
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/x-www-form-urlencoded
The following table summarizes the POST request parameters.
Table 9-98 Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
api_version |
Specific API version, such as v1 | Path | Yes | None |
sourceFileName |
Name of the file to be copied | Form | Yes | None |
userName |
User with access to the source instance | Form | Yes | None |
pwd |
The location and name of the file containing the encrypted
password for the user. The encrypted password must then be passed as
one of the parameters for the Copy File REST API.
For information
on encrypting and generating the |
Form | Yes | None |
sourceURL |
The URL of the source instance | Form | Yes | None |
targetFileName |
Name of the file to be copied to the target environment | Form | Yes | None |
Response
Supported Media Types: application/json
Table 9-99 Parameters
Name | Description |
---|---|
details |
In the case of errors, details are published with the error string |
status |
See Migration Status Codes |
links |
Detailed information about the link |
href |
Links to API call or status API |
action |
The HTTP call type |
rel |
Possible values: self or Job Status . If the value is set to Job Status , you can use the href to get the status
|
data |
Parameters as key value pairs passed in the request |
Example of Response Body
The following shows an example of the response body in JSON format.
{"status":-1, "items": null, "links":[{"rel":"self", "href":"https://<<BASE URL>/interop/rest/v1/services/copyfile","data":null,"action":"POST"},{"rel":"Job Status","href":"https://<BASE URL>/interop/rest/v1/services/jobs/1502357937045","data":null,"action":"GET"}],"details":null