Hi Giuseppe,I'm trying similar with CSV ingestion and noticed the
documentation mentioned performing a PUT against the task rather than tasks
(http://docs.geoserver.org/stable/en/user/extensions/importer/rest_reference.html
-> Single task resource ->Updating a task) but, as Andrea, says, using the
'tasks' worked.PUT -H "Content-type: application/json" -d
@UpdateCSVAppend.json
"http://localhost:8080/geoserver/rest/imports/2/tasks/0"where
UpdateCSVAppend.json is {       "task": {               "updateMode": "APPEND"  
} }Looking at
your examples, the issue you may face is that your PostGIS table seems like
it is 'site_boundary' but your update uses the table name from the shape
filename i.e. area1This is my status on my attempt:-{ "task": {  "id": 0, 
"href": "http://localhost:8080/geoserver/rest/imports/2/tasks/0";,  "state":
"ERROR",  "updateMode": "APPEND",  "data": {    "type": "file",    "format":
"CSV",    "file": "ais_hdr-pt2.csv"  },  "target": {    "href":
"http://localhost:8080/geoserver/rest/imports/2/tasks/0/target";,   
"dataStore": {      "name": "AISstore",      "type": "PostGIS"    }  }, 
"progress":
"http://localhost:8080/geoserver/rest/imports/2/tasks/0/progress";,  "layer":
{    "name": "aisrecords0",    "href":
"http://localhost:8080/geoserver/rest/imports/2/tasks/0/layer";  }, 
"errorMessage": "Schema 'ais_hdr-pt2' does not exist.",  "transformChain": {   
"type": "vector",    "transforms": [    {      "type":
"AttributesToPointGeometryTransform",      "href":
"http://localhost:8080/geoserver/rest/imports/2/tasks/0/transforms/0";    }   
]  } }}As you can see from my example, I have a csv file called
ais_hdr-pt2.csv that I wanted to use as an update to an existing PostGIS
table called aisrecords0, through a layer called aisrecords0.I wasn't able
to find how to state the table that should be updated so I get that error
status   "errorMessage": "Schema 'ais_hdr-pt2' does not exist.",Is anyone
able to suggest what mechanism/message I need to apply to allow this (and
probably Giuseppe's update to work too)?CheersAndy
geowolf wrote
> On Mon, Feb 5, 2018 at 9:18 AM, Giuseppe Falcone <

> falcone.giuseppe@

> > wrote:>> 2. post on
> http://192.168.1.193:8080/geoserver/rest/imports/7/tasks>
> <http://192.168.1.193:8080/geoserver/rest/imports/1/tasks> of a
> shapefile> zip and obtain this response:>> {>     "task": {>         "id":
> 0,>         "href": "http://192.168.1.193:8080/geo>
> server/rest/imports/7/tasks/0",>         "state": "READY",>        
> "updateMode": "CREATE",>         "data": {>             "type": "file",>      
>       
> "format": "Shapefile",>             "file": "area1.shp">         },>        
> "target": {>             "href": "http://192.168.1.193:8080/geo>
> server/rest/imports/7/tasks/0/target",>             "dataStore": {>           
>      
> "name": "db_public",>                 "type": "PostGIS">             }>       
>  
> },>         "progress": "http://192.168.1.193:8080/geo>
> server/rest/imports/7/tasks/0/progress",>         "layer": {>            
> "name": "area1",>             "href": "http://192.168.1.193:8080/geo>
> server/rest/imports/7/tasks/0/layer">         },>        
> "transformChain": {>             "type": "vector",>            
> "transforms": []>         }>     }> }>> 3. Now I want update this task to
> send data in append into an existing> geoserver layer (with the same
> shapefiles attributes) and I execute a put on> 
> http://192.168.1.193:8080/geoserver/rest/imports/7/task/0  with this
> json>The backlinks above state the task is at
> "http://192.168.1.193:8080/geoserver/rest/imports/7/tasks/0";, but
> you'rePUT-ing to
> "http://192.168.1.193:8080/geoserver/rest/imports/7/task/0";(tasks vs
> task).That seems in line with the exception you're getting, with the
> importresource being called instead of the task one.Mind, 2.10.x is not
> supported anymore, and all REST API has been rewrittenfrom scratch in
> 2.12.x series.With 2.10.x long gone and 2.11.x about to get unsupported in
> a month, Iwould suggest you switch to 2.12.x, it will be supported for
> anothersix months and it is going to make answering questions easier





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html
_______________________________________________
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


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to