Skip to main content
Solved

How to upload shape to geoserver rest api?

  • October 28, 2022
  • 2 replies
  • 272 views

limo
Supporter
Forum|alt.badge.img+8
  • Supporter

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?

Best answer by limo

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.

View original
Did this help you find an answer to your question?

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

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.


limo
Supporter
Forum|alt.badge.img+8
  • Author
  • Supporter
  • Best Answer
  • October 28, 2022

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings