Copy a File Between Instances

Use this REST API to copy a file from one environment (source) to another environment (target).

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.epw file 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.

Before using the REST resources, you must understand how to access the REST resources and other important concepts. See About the REST APIs. Using this REST API requires prerequisites. See Prerequisites.

This REST API is version v1.

REST Resource

POST /interop/rest/v1/services/copyfile

Supported Media Types: application/json

Parameters:

The following table summarizes the POST request parameters.

Table 6-52 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. For information on encrypting and generating the password.epw file with EPM Automate, see the encrypt command in Command Reference in Working with EPM Automate for Oracle Enterprise Performance Management Cloud. 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

Parameters:

Table 6-53 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 of the recreate service
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://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v1/services/copyfile","data":null,"action":"POST"},{"rel":"Job Status","href":"https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v1/services/jobs/1502357937045","data":null,"action":"GET"}],"details":null