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
<https://docs.geoserver.org/latest/en/user/extensions/importer/rest_reference.html>,
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
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to