Solved

How to upload shape to geoserver rest api?

  • 28 October 2022
  • 2 replies
  • 46 views

Badge +7

Hi,

 

I will try to upload shapefile to geoserver over the rest api.

This should be possible with the HTTPCaller! I am using the following option: - http methode: PUT

Upload from data

...

imageBut I get the error:

image 

I have access to the given url. So what is the problem here?

Does someone has experience in uploading shapes to geoserver with fme?

icon

Best answer by limo 28 October 2022, 12:45

View original

2 replies

Userlevel 6
Badge +32

I have no experience using GeoServer's API. As this is a specific GeoServer, not FME question, I think you probably have more reponse if you ask this on https://gis.stackexchange.com/

 

That being said, my best practice to learn how to work with the syntax of a new API is to use PostMan. When it works, replicate the webrequest(s) in HTTPCallers in FME.

Badge +7

thanks for your hint!

I found out that the url was not correct. I need to add .../file.shp that Geoserver (rest) knows nex external data will come. Furthermore I need all files of the shape. So I have to zip all files and to define "application/zip" as content-type.

 

Now it work. New data will be published on the server and the layer is created automatically in geoserver.

Reply