Copy from Object Store (v2)
Use the Copy from Object Store (v2) REST API to copy a file or a backup snapshot from the Oracle Object Storage Cloud (the source) to the cloud environment (the target). If you are copying a backup snapshot, this API copies it from the Object Storage bucket and extracts its contents in Oracle Enterprise Performance Management Cloud.
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.
Note:
The Object Storage requires an Other Web Services Provider type. Ensure that you have access to the Web service you are connecting. You must also have URLs for the Web service and an login details if required. For information see, Connecting to External Web Services in Administering Planning.
This REST API is version v2.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v2/objectstorage/copyfrom
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.
Table 9-75 Tasks
Task | Request | REST Resource |
---|---|---|
Trigger copyfromobjectstore |
POST | /interop/rest/v2/objectstorage/copyfrom |
Retrieve copyfromobjectstore status
|
GET | /interop/rest/v2/status/jobs/777 |
Request
Supported Media Types: application/json
Table 9-76 Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
url |
The URL for Oracle Cloud Object Storage, appended with the bucket name and an optional object name. This is the URL format: :
Components of this URL:
For more information, see these topics in Oracle Cloud Infrastructure Documentation: |
Payload | Yes | None |
userName |
The ID of a user who has the required access rights to write to Oracle Object Storage Cloud. For users created in a federated identity provider, specify the
fully-qualified name of the user (for example,
|
Payload | Yes | None |
password |
The Swift password or auth token associated with the user. This password is not the same as the password that you use to sign into the Object Storage Console. Auth token is an Oracle-generated token that you use to authenticate with third-party APIs, for example to authenticate with a Swift client. For instructions to create this token, see To create an auth token in Oracle Cloud Infrastructure Documentation . |
Payload | Yes | None |
targetFile |
Name of the target filename (with path) of the downloaded artifact. When copying snapshots, do not specify the ZIP extension. Examples: Artifact Snapshot_24_Sept_2020, inbox/File_new.txt |
Payload | Yes | None |
Example URL and Payload
https://<BASE URL>/interop/rest/v2/objectstorage/copyfrom
{
"url":"https://swiftobjectstorage.<region_identifier>.oraclecloud.com/v1/namespace/bucket_name/object_name",
"userName": "epm_user",
"password": "epm_password",
"targetFile": "Artifact snapshot"
}
Response
Supported Media Types: application/json
Table 9-77 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.
{
"details": null,
"status": -1,
"items": null,
"links": [
{
"href": " https://<BASE URL>/interop/rest/v2/objectstorage/copyfrom",
"action": "POST",
"rel": "self",
"data": null
},
{
"href": " https://<BASE URL>/interop/rest/v2/status/jobs/4003051833546274",
"action": "GET",
"rel": "Job Status",
"data": null
}
]
}
Sample cURL Command
curl -X POST -s -u '<USERNAME>:<PASSWORD>' -o response.txt -D respHeader.txt -H
'Content-Type: application/json' -d '{"url":"OBJECT_STORAGE_URL","userName":"USER_NAME","password":"PASSWORD",
"targetFile":"FILEPATH/FILENAME"}' 'https://<BASE URL>/interop/rest/v2/objectstorage/copyfrom'