Download (11.1.2.3.600)

Downloads a file from the repository to the current directory in the local environment.

If the content type of the response is application/JSON, then an error with details is displayed on the server. Otherwise, the content of the file is streamed through the response.

Note: The entire path to the file must be encoded, for example, changing / to %2F and spaces to %20. This API can be used to download files up to 1GB in a single request.

For example, change this path to an .HTML file in the apr directory:

apr/2020-03-04 23_07_20/2020-03-04 23_07_20.html

to this:

apr%2F2020-03-04%2023_07_20%2F2020-03-04%2023_07_20.html

Required Roles

Service Administrator

Any predefined role and the Migrations – Administer granular role

REST Resource

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

Request

Table 9-21 Parameters

Name Description Type Required Default
applicationSnapshotName

Application snapshot name or file name to download (for example, "Artifact Snapshot" or s112.csv).

The entire applicationSnapshotName must be encoded before sending the request.

To download a particular file, provide the path to that file as the value of applicationSnapshotName. For example, to download a Data Management file called s112.csv in the inbox, refer to the file as "inbox\s112.csv" in the path parameter.

To download the Activity Reports or access log, use the fully qualified file name as shown in the output of List Files.

For example, to download a specific file from the apr directory, use the following format: pr%2F2020-03-04%0A23_07_20%2F2020-03-04%0A23_07_20.html apr%2F%0A2020-03-04%2023_07_20%2F%0Aaccess_log.zip apr%2F%0A2020-03-04%2023_07_20%2F%0Aactivityreport.json.

Path Yes None

Example of Request

https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/Vision.zip/contents

Table 9-22 Parameters

Name Description
Details In 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
Action The HTTP call type
Rel Possibly value: self
Data Parameters as key value pairs passed in the request

Response

Supported Media Types: application/json or application/octet-stream

Example of Response Body

{
    "details": "Invalid file : Vision.zip",
    "status":1,
    "links":[{
		"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/Vision.zip/contents",
		"action":"GET",
		"rel":"self",
		"data":null
    }]
}

Sample cURL Command

curl -X POST -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/octet-stream'  --data-binary '@<FILE_NAME_PATH>' 'https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/<FILE_NAME>/contents