<relationship_uri>/dataimport[.<format>]? dataType=UDB
<relationship_uri>/dataimport[.<format>]? dataType=CSV
<relationship_uri>/dataimport[.<format>]? dataType=WORKSPACE
<relationship_uri>/dataimport[.<format>]? dataType=EXCEL
<relationship_uri>/dataimport[.<format>]? dataType=GEOJSON
dataimport resource. By sending POST request to dataimport resource, you can import dataset. Supported import file formats are: csv file,zip package(which can contain udb,smwu),EXCEL,GEOJSON.
Supported Methods:
Supported output formats: rjson, json, html, xml.
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/relationship/dataimport.rjson? dataType=UDB
http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/dataimport.rjson? dataType=CSV&separator={separator}&xIndex={xIndex}&yIndex={yIndex}
http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/dataimport.rjson? dataType=WORKSPACE
http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/dataimport.rjson? dataType=EXCEL&xIndex={xIndex}&yIndex={yIndex}
http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/dataimport.rjson? dataType=GEOJSON
Executes upload to put file in DataStore.
Following arguments need to be contained in URI:
Name | Type | Description |
dataType | String | [Required] Five types of files are supported, among which CSV and EXECEL support only point dataset. UDB、CSV、WORKSPACE、EXCEL、GEOJSON |
Following arguments need to be contained in URI if dataType is CSV or EXCEL.
Name | Type | Description |
separator | String | separator(need to be passed when using csv data) |
xIndex | String | x column index(need to be passed when using CSV or EXCEL) |
yIndex | String | y column index(need to be passed when using CSV or EXCEL) |
Executes POST request on dataimport resource. The response arguments are as follows:
Field | Type | Description |
newResourceID | String | Id generated when importing dataset. |
newResourceLocation | String | URL generated when importing dataset. |
succeed | String | Whether it's successful to import data. |
The returned rjson format representation after implementing the GET request on the dataimport resource http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/dataimport.rjson?dataType=UDB is as follows:
{
"newResourceID": "840893780_b1b50538_15a9_46c6_8d29_c0349fc0d587"
"newResourceLocation": "http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datas/840893780_b1b50538_15a9_46c6_8d29_c0349fc0d587"
"succeed": True
}
The returned rjson format representation after implementing the GET request on the dataimport resource http://supermapiserver:8090//iserver/services/datacatalog/rest/datacatalog/relationship/dataimport.rjson?dataType=CSV&separator=,&xIndex=10&yIndex=11 is as follows:
{
"newResourceID": "-2056616596_62de25f2_90b9_4afe_81f9_d62a77b618d4"
"newResourceLocation": "http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datas/-2056616596_62de25f2_90b9_4afe_81f9_d62a77b618d4"
"succeed": True
}
The returned rjson format representation after implementing the GET request on the dataimport resource http://supermapiserver:8090//iserver/services/datacatalog/rest/datacatalog/relationship/dataimport.rjson?dataType=WORKSPACE is as follows:
{
"newResourceID": "894459517_b33b2a20_ae01_42c6_a57d_3c4780183cc4"
"newResourceLocation": "http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datas/-2056616596_62de25f2_90b9_4afe_81f9_d62a77b618d4"
"succeed": True
}
The returned rjson format representation after implementing the GET request on the dataimport resource http://supermapiserver:8090//iserver/services/datacatalog/rest/datacatalog/relationship/dataimport.rjson?dataType=EXCEL&xIndex=10&yIndex=11 is as follows:
{
"newResourceID": "1115150101_40119aaa_e277_4e19_abe8_829b5e4e585b"
"newResourceLocation": "http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datas/-1115150101_40119aaa_e277_4e19_abe8_829b5e4e585b"
"succeed": True
}
The returned rjson format representation after implementing the GET request on the dataimport resource http://supermapiserver:8090//iserver/services/datacatalog/rest/datacatalog/relationship/dataimport.rjson?dataType=GEOJSON is as follows:
{
"newResourceID": "1679763739_457185c0_c5d2_440f_8d63_a46c35716d66"
"newResourceLocation": "http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datas/-1679763739_457185c0_c5d2_440f_8d63_a46c35716d66"
"succeed": True
}
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 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.