URI
<binary_uri>/dataimport[.<format>]
Supported methods
Parent resource
Introduction
The dataimport resource can be used to upload binary file to DataStore. By sending POST request to dataimport resource, you can upload binary file to DataStore.
Supported Methods:
- POST: Uploads binary file to DataStore.
- HEAD: Checks whether the dataimport resource exists or whether there is a permission to access the resource.
Supported output formats: rjson, json, html, xml.
Resource hierarchy
HTTP request methods
Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.
http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/binary/dataimport.rjson
POST request
Executes upload to put binary file in DataStore.
Response structure
Executes POST request on dataimport resource. The response arguments are as follows:
Field | Type | Description |
dataId | String | Id of uploaded file. |
succeed | boolean | Whether it's successful to import data. |
Response example
The returned rjson format representation after implementing the GET request on the dataimport resource http://supermapiserver:8090//iserver/services/datacatalog/rest/datacatalog/binary/dataimport.rjson is as follows:
{
"dataId":"594ca83fe084f411bcb22575"
"succeed":True
}
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 contained 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 whether the dataimport resource exists, or whether the the client has the permission to access it. It can also determine if the dataimport resource supports an output format <format> if performed on a URI with .<format> included.