Acquiring Event Data File Saved by Dataloader
This document has been machine translated.
Returns the information of the file in Event data saved by Dataloader WebAPI. In the case of jpeg and tiff formats, the latitude and longitude will be embedded and returned as EXIF information.
Endpoint
https://pf.xdata.nict.jp/api/v1/getfileapi/jsonrpc
Request example
The following is an example request when data_name is defined with the name test_event_001 in [loaderwebapi.add_record].
{
"id": 1,
"jsonrpc": "2.0",
"method": "getfileapi.get_file",
"params": {
"data_name": "test_event_001",
"prefix_id": 1,
"path_id": "your_path_id",
"file_name": "your_file_name.jpg"
}
}
Response example
The following is the return contents in the above request example.
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"file_data": "/9j/..."
}
}
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.prefix_id
: The value of the column name defined infile_prefixid_column
when using register_loader. You must specify 1.path_id
: The value of the column name defined infile_pathid_column
when using register_loader.file_name
: The value of the column name defined infile_name_column
when using register_loader.
Return values
file_data
: It will be returned as a base64ized character string, and if there is spatiotemporal information in the jpeg or tiff file, it will be embedded in the form of EXIF.