Copy Application Snapshot (v2)
Use this REST API (v2) to copy a snapshot 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 snapshot is to be copied.
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 copyfrominstance
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 v2.
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management application role
REST Resource
POST /interop/rest/v2/snapshots/copyfrominstance
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-64 Tasks for Copy Application Snapshot
Task | Request | REST Resource |
---|---|---|
Trigger copysnapshot |
POST | /interop/rest/v2/snapshots/copyfrominstance |
Retrieve copysnapshot status
|
GET | /interop/rest/v2/status/jobs/777 |
Request
Supported Media Types: application/json
The following table summarizes the POST request parameters.
Table 9-65 Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
snapshotName |
Name of the snapshot to be copied | Payload | Yes | None |
userName |
User with the Service Administrator predefined role in the source instance | Payload | Yes | None |
fpwd |
The encrypted password for the source user to be passed as a string. For information on encrypting and generating the
|
Payload | Yes | None |
sourceURL |
The URL of the source instance |
Payload | Yes | None |
Example URL and Payload
https://<BASE URL>/interop/rest/snapshots/copyfrominstance
{
"snapshotName": "<NAME>",
"userName": "<USERNAME>",
"fpwd": "e0VQTUFUfWtWV3czam8xdDJlcFZJbUVhSVQ3VWc9PS5lcHcyMDE1LmFkbW", "sourceURL": "https://<BASE URL>"
}
Response
Supported Media Types: application/json
Table 9-66 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 copy snapshot
|
data |
null |
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/v2/snapshots/copyfrominstance",
"data": null,
"action": "POST"
}, {
"rel": "Job Status",
"href": "https://<BASE URL>/interop/rest/v2/status/jobs/1502357937045",
"data": null,
"action": "GET"
}],
"details": null
}
Sample cURL command
curl -X POST -s -u '<USERNAME>:<PASSWORD>' -o response.txt -D respHeader.txt -H 'Content-Type: application/json' -d '{"snapshotName":"SNAPSHOT_TO_BE_COPIED", "sourceURL":"SOURCE_URL","userName":"USER_NAME","fpwd":"ENCRYPTED_PASSWORD"}' 'https://<BASE URL>/interop/rest/v2/snapshots/copyfrominstance'