Copy to Object Store (v1)

Use the Copy to Object Store (v1) REST API to copy a file or a backup snapshot from the current cloud environment (the source) to the Oracle Object Storage Cloud (the target). You can copy any file or snapshot available in the EPM Cloud. For example, if you export data to a file, the exported file is stored in the Outbox. You can then use this API to copy the file directly to Oracle Object Storage, assuming you have an account.

This topic describes the v1 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.

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.

Required Roles

Service Administrator

REST Resource

POST /interop/rest/v1/services/copytoobjectstore

Supported Media Types: application/x-www-form-urlencoded

Table 8-56 Tasks for Copy to Object Store

Task Request REST Resource
Trigger copytoobjectstore POST /interop/rest/v1/services/copytoobjectstore
Retrieve copytoobjectstore  status GET /interop/rest/v1/services/jobs/777


The following table summarizes the request parameters.

Table 8-57 Parameters

Name Description Type Required Default
url Oracle Object Storage Cloud bucket with an optional object name appended. The URL format without object name:

The URL format with object name:

Components of this URL:

  • region_identifier is an Oracle Cloud Infrastructure hosting region.
  • namespace is the top-level container for all buckets and objects. Each Oracle Cloud Infrastructure tenant is assigned a unique system-generated and immutable Object Storage namespace name at account creation time. Your tenancy's namespace name, for example, axaxnpcrorw5, is effective across all regions.
  • bucket_name is the name of a logical container where you store your data and files. Buckets are organized and maintained under compartments. A system generated bucket name, for example, bucket-20210301-1359 reflects the current year, month, day, and time.
  • object_name, optionally, is name that you want to use for the file on Oracle Object Storage Cloud. If an object name is not specified, the file will be copied with its original name.

For more information, see these topics in Oracle Cloud Infrastructure Documentation:

Form Yes None
username The name of the user who has access to the Object Store Form Yes None

The password for the user who has access to the Object Store

Form Yes None

Name of the file (with path) to be copied to the Store. If you are copying a snapshot, do not specify the ZIP extension.

Examples: Artifact Snapshot, inbox/File.txt

Form Yes None

Sample request payload:

url: https://swiftobjectstorage.<region_identifier>
username: <username>
password: <password>
filepath: Artifact Snapshot


Supported Media Types: application/json


Table 8-58 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.

	"status": -1,
	"items": null,
	"links": [{
		"rel": "self",
		"href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>",
		"data": null,
		"action": "POST"
	}, {
		"rel": "Job Status",
		"href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>",
		"data": null,
		"action": "GET"
	"details": null

The password parameter value is clear text.

copyToObjectStore Sample code:

public void copyToObjectStore() throws Exception {

	String filepath = "FILE NAME/FILE PATH";
	String username = "USER NAME";
	String url = "https://swiftobjectstorage.<region_identifier><namespace>/<bucket_name>";
	String password = "PASSWORD";

	String urlString = String.format("%s/interop/rest/v1/services/copytoobjectstore", serverUrl);

	String params = "url=" + url + "&userName=" + username + "&password=" + password + "&filepath=" +filepath;

	String response = executeRequest(urlString, "POST", params, "application/x-www-form-urlencoded");

	getJobStatus(fetchPingUrlFromResponse(response, "Job Status"), "GET");
Common Functions