Dataloader WebAPI / Record initialization
Returns an empty json for inserting event data. It can also be used to get the event data structure of interest.
Endpoint
https://pf.xdata.nict.jp/api/v1/dataloaderapi/jsonrpc
Request example
The following is an example request when data_name is defined with the name test_event_001 using loaderwebapi.register_loader.
{
"id": 1,
"jsonrpc": "2.0",
"method": "loaderwebapi.init_record",
"params": {
"data_name": "test_event_001",
"record_set_size": 2
}
}
Response example
The following is the return contents in the above request example.
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"features": [
{
"geometry": null,
"properties": {
"start_datetime": null,
"end_datetime": null,
"test_varchar_1": null
},
"type": "Feature"
},
{
"geometry": null,
"properties": {
"start_datetime": null,
"end_datetime": null,
"test_varchar_1": null
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}
}
Parameters
Among the JSON-RPC request contents, the ones that can be specified in params are displayed below. All parameters are required.
data_name
: A name that points to the table in which you want to insert the data. Use the one specified in loaderwebapi.register_loader.record_set_size
: The size of the return array
Return values
Returns a GeoJson template for use with loaderwebapi.add_record.
The number of elements in features
is the value specified by record_set_size
.
The properties
of each element of features
contains keys other than the geometry
attribute of all the attributes that the specified data can have.
The value of geometry
and each attribute is null.