URI
<myData_uri>/download[.<format>]
Supported methods
Parent resource
Introduction
The fileDownload resource is used to download data file specified by data item id, which belongs to my data file. It supports the use of HTTP Range header to achieve transmission resuming at break-points.
Supported Methods:
- GET: Download data file specified by data item id.
- HEAD: Check whether the fileDownload resource exists, or have the right to access the fileDownload resource.
Supported Formats: Data stream.
Resource hierarchy
HTTP request methods
Implement the HTTP request on the following URI, where supermapiportal is the server name, with rjson being the output format.
http://supermapiportal:8090/iportal/web/mycontent/datas/{id}/download
GET request
Download data file specified by data item id.
Response example
Implement the GET request on the fileDownload resource http://localhost:8090/iportal/web/mycontent/datas/1/download to acquire the downloa file of the date item. The name of the downloaded and the name of the data item are the same.
HEAD request
Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.
HEAD request can be used to check if the fileDownload resource exists, or if the fileDownload resource can be accessed by clients. It can also determine if the fileDownload resource supports an output format <format> if performed on a URI with .<format> included.