GeoServer – Using REST Service

geoserverrest

I have downloaded and installed GeoServer 2.1-RC1 which shipped with RESTconfig. How can i check whether REST service is installed with GeoServer or Not ?

I put this "http://localhost:8080/geoserver/rest" in my browser, but it gives error! … It means REST service is not installed as i understand. Or is there any other method to check whether the service is installed or not ?

Best Answer

Have you tried any of the configuration examples in the docs (here)?

You can access layer information through e.g. http://localhost:8080/geoserver/rest/layers/giant_polygon.html

Publishing a shapefile works like this:

Consider a directory on the server /data/shapefiles/roads that contains the Shapefile roads.shp. The following adds a new datastore for the Shapefile:

curl -u admin:geoserver -XPUT -H 'Content-type: text/plain' \
-d 'file:///data/shapefiles/roads/roads.shp' \
http://localhost:8080/geoserver/rest/workspaces/acme/datastores/roads/external.shp

Source: Geoserver REST Docs (Also describes how to add a PostGIS layer.)

Related Question