Download Application Snapshot

Downloads the application snapshot from EPM repository to the local location from where client is being run. After receiving the response, if the content type is application/json then there would be an error on server and refer to details. Else, if it’s application/octet-stream, then the content to be downloaded is part of the response and can read from the response body.

This API is version v1.

REST Resource

GET /interop/rest/{api_version}/applicationsnapshots/{applicationSnapshotName}/contents

Parameters:

The following table summarizes the GET request parameters.

Table 6-28 Parameters

Name Description Type Required Default
applicationSnapshotName Application snapshot name that needs to be uploaded Path Yes N/A

Response

Supported Media Types: application/json

Response Header

fileExtension - This will have the file extension that can be used to create a file locally. Can contain values such as zip or csv.

Parameters:

Table 6-29 Parameters

Attribute Description
details

Published in case of errors with the error string

status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
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 in case there is an error during download.

{
    "details":"Not a valid file.",
    "status":8,
    "links":[{
		"href":"https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v1/applicationsnapshots/s112.csv/contents",
		"action":"GET",
		"rel":"self",
		"data":null
    }]
}

Download Application Snapshot Sample Code

Java Sample – downloadAppSnapshot.java

See Java Sample, downloadFile.java

cURL Sample – DownloadAppSnapshot.sh

See cURL Sample, DownloadFile.sh

Groovy Sample – DownloadAppSnapshot.groovy

See Groovy Sample, DownloadFile.groovy