Download
Downloads a file from the repository to the current directory in the local environment.
Filenames containing non-ASCII characters, including Japanese characters, are
preserved when downloaded using clients that support the
filename*parameter of the Content-Disposition
response header. ASCII filenames continue to be supported.
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 application role and the Migrations – Administer granular role
REST Resource
GET
/interop/rest/11.1.2.3.600/applicationsnapshots/{applicationSnapshotName}/contents
Request
Table 2-200 Parameters
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
applicationSnapshotName |
Application snapshot name or file name to download (for example, The entire To download a particular file, provide the path to that file as the value of 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 |
Path | Yes | None |
Example of Request
https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/Vision.zip/contentsTable 2-201 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
Response Header
Content-Disposition: Successful file download responses include the attachment
disposition and a filename* parameter containing the UTF-8
percent-encoded filename. Supporting clients can decode this parameter to obtain the
original filename, including non-ASCII characters, spaces, and supported special
characters.
JSON error responses do not include the Content-Disposition attachment header. Existing error-response behavior remains unchanged.
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