Hi, I’m trying to understand how I can create new import id by GeoServer RESTful api for transfer data from external PostGIS database into my PostGIS datastore in my workspace,
I read this link, I could found instruction for import shapefiles type and remote type but I didn’t find any clear instructions when user want create new import when type is database!
I did try to define my external connection parameters in import.json for create new import id, I get this message “TODO:implement%” in my terminal when I run this command in my Linux terminal:
sudo curl -u admin:@dmin9901 -XPOST -H “Content-type: application/json” -d @import.json “http://localhost:8080/geoserver/rest/imports”
Could you please help me how I can transfer my data(or tables) from external databases to my datastore by RESTful API?
this is my import.json:
{
“import”: {
“targetStore”: {
“dataStore”: {
“name”: “economic”
}
},
“targetWorkspace”: {
“workspace”: {
“name”: “environment”
}
},
“data”: {
“type”: “database”,
“connectionparameters”:{
“host”:“localhost”,
“port”:“5432”,
“database”:“waterdb”,
“user”:“postgres”,
“passwd”:“postgres”,
},
}
}
}
My system info: GeoServer 2.18.1 , PostgreSQL v13, PostGIS 3, OS: Debian 10 X64