Copy Application Snapshot (v2)

Use this REST API 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.

Required Roles

Service Administrator

Any predefined role and the Migrations – Administer granular role

REST Resource

POST /interop/rest/v2/snapshots/copyfrominstance

Table 9-62 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

Table 9-63 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 Base-64 encloded password for the source user.

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-64 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

{
	"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":"BASE64ENCODED_PASSWORD"}' 'https://<BASE URL>/interop/rest/v2/snapshots/copyfrominstance'