Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [geoserver-rest-api]

For questions about GeoServer's REST API

1
vote
1answer
112 views

One single cURL command to delete a GeoServer raster layer (coverage) from a coveragestore via REST

I have published a GeoTIFF image to a GeoServer coveragestore as a layer. In order to delete the layer I had to run the following two cURL commands: curl -v -u admin:geoserver -XDELETE http://...
4
votes
3answers
964 views

Creating new GeoServer user through rest api?

I've tried posting this xml: <user> <userName>Jim</userName> <password>password</password> <enabled>true</enabled> </user> to these ...
0
votes
1answer
47 views

How to automate generating Directory of spatial files (shapefiles) and publishing contents via REST in GeoServer 2.14

I have a folder containing shape files for a few dozen layers. On my development server, I created a Directory of Spatial files store in my workspace, then published each one, one at a time, with the ...
3
votes
2answers
824 views

Add new style using REST api in geoserver

I have worked with geoserver rest api and it is great, The only problem is that I have no idea how to post content of my sld using api, I have this code public void AddNewStyle(String styledata, ...
1
vote
2answers
102 views

Unable to Upload shapefile using GeoServer REST API using Java

I am trying to upload shapefiles through GeoServer REST API's. I am not able to create new layer with this following snippet of code. However Create Workspace and style method works fine using this ...
1
vote
1answer
155 views

Error in installing gsconfig python library for manipulating a GeoServer instance via the GeoServer RESTConfig API

I like to install gsconfig python libraries I got error like this Collecting gsconfig Downloading gsconfig-0.6.13.tar.gz Traceback (most recent call last): File "<string>", line 20, in <...
2
votes
1answer
474 views

Error to add store through cURL REST API too geoserver

I have problem with adding raster layer to geoserver automatically. I need, that geoserver add layer without person job, only script action and i saw that it may be done with cURL REST API but, i can'...
1
vote
0answers
31 views

GeoServer S3 Support for GeoTIFF REST-API

I am stuck with S3 Support for GeoTIFF while I add a dataset with the REST-API. I did not find any documentation for the REST-API... so I tried to edit my local API-POST-Call: <coverageStore> ...
0
votes
1answer
15 views

Creating CoverageStore using REST API from GeoTIFF already in GeoServer DATA_DIR

I have a GeoTIFF already available in GeoServer DATA_DIR, specifically in a subdir named "rice" and I woluld like to publish it as a CoverageStore. What I could understand is that REST API allows to ...
1
vote
2answers
55 views

Upload many layers from PostGIS database to GeoServer using curl

I have more than 200 layers in my PostGIS database and I want to publish those layers in GeoServer using curl. I've imported one layer using the command below but can't figure out how to upload all ...
0
votes
0answers
57 views

Problems with GeoServer REST API via Python and text encoding

I have checked a few other threads talking about GeoServer REST API and encoding, but nothing seemed to work. I have a dataset already uploaded into GeoServer and now I just want to update some of ...
0
votes
2answers
821 views

Using DATA_DIR relative path in GeoServer?

I am using REST API with curl to populate geoserver with layers on the server. I am not setting GEOSERVER_HOME so Geoserver itself decides what the actual path is. However, when I download the ...
7
votes
1answer
1k views

GeoServer automate “reload feature type”

Using GeoServer, if you add a feature type bound to a SQL table that is empty, when you then populate that table no data shows up in layer preview. Clicking the "reload feature type" button corrects ...
1
vote
0answers
66 views

How can I add new ROLES and USERS through REST in GeoServer?

I use GeoServer stable version 2.14.1 and get error messages when trying to add new roles and users via REST. I suspect that the GeoServer REST documentation is buggy. When I call the REST interface ...
2
votes
1answer
167 views

Problem with GeoServer modifying a style when uploading an SLD via the REST API

I have an SLD called my_data.sld (created in QGIS 3.2.x) with looks like this: <?xml version="1.0" encoding="UTF-8"?> <StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:xlink="...
3
votes
2answers
2k views

Creating Workspace, Data Store and Layer via GeoServer REST API?

I'm trying to automate the process of setting up a Workspace, PostGIS Data Store and Layer in GeoServer using the GeoServer REST API. Using the excellent answer in Create a Layer in GeoServer using ...
1
vote
1answer
264 views

Add Layers to GeoServer with REST API

I'm trying to add a new layer to GeoServer programmatically, So at first i have added a new workspace and then a new datastores, so far eveything is good, but when i'm trying to add a new layer i get ...
0
votes
1answer
99 views

How to add custom REST controller with @RestController annotation?

I have this dilemma. As from 2.14 version of GeoServer, there is a new way to write rest controller using @RestController annotation and extending RestBaseController.class But after starting the ...
2
votes
0answers
30 views

How to set tile image formats for many layers using the Geoserver REST api

I have over 400 layers in my Geoserver layer catalog. I would like to turn on the pbf tile image format option for all of them. see image below: Is there a way of accomplishing this using the ...
1
vote
1answer
315 views

Http 500 error when creating workspace using GeoServer REST-API

Trying to create a new wokspace at GeoServer 2.12 via REST-API I'm getting Http 500 error. I tried this advise but it didn't work. Request: :~> curl -v -u admin:geoserver -X POST -H "accept: ...
5
votes
1answer
922 views

Is there a way to import GeoJSON into GeoServer using some extension without using PostGIS?

Is there a way to import GeoJSON into GeoServer using some extension. I do not want to import to PostGIS, or intermediately convert to shapefiles because that looses the styles but may be that is ...
1
vote
0answers
147 views

Automate publishing of WMS or WFS Layer in GeoServer using OpenLayers 3? [closed]

How to automate publishing of a WMS or WFS Layer in Geoserver given any data source (vector/shape-files/GeoJson...) using OpenLayers 3 script There is a possibility to automate Geoserver operations ...
2
votes
1answer
109 views

Geoserver - PostGIS : WFS-Transaction update exception error-Parsing failed for Point:

I tried to perform a transaction update, but it failed with this exception message: <owsExceptionReport.xsd"> <ows:Exception exceptionCode="NoApplicableCode"> <ows:...
1
vote
1answer
52 views

Enable tile caching for a layer

I published around 1000 layers in geoserver without enabling tile caching for layer.How to check a cache is enabled for a layer or not and How to enable tile caching (check box) for a layer under ...
1
vote
0answers
29 views

How do I secure a specific workspace in Geoserver REST API?

I want Geoserver rest security setup so that only a specific role can access everything under a specific workspace. This is what my /datadir/security/rest.properties file looks like: /**;GET=ADMIN /*...
0
votes
1answer
129 views

How to get the geometry type of a layer in GeoServer?

I need to programmatically know the geometry type (lines, polygons or points) of a layer in GeoServer. I'm trying to do this using the REST API but can't seem to find a way. Any clues?
3
votes
1answer
110 views

Geoserver gwc rest api - how can I edit config

Is there a way to change geoserver gwc-gs.xml through a rest interface? I want to be able to set cacheLayersByDefault to false.
0
votes
2answers
704 views

Can we add features to geoserver layer using REST [closed]

As in ArcGIS Online, can we add the features to GeoServer layer though REST API? If yes, can you tell me where i can find the help on this? Or can you tell me how I can write my own REST API to ...
0
votes
0answers
22 views

Post GeoJSON feature to Geoserver via REST API [duplicate]

Here is a post with the same question, but asked 3 years ago. I wonder if anything might have changed? I want to use REST to add features to a map. I would send a post with the GeoJSON of the feature,...
0
votes
1answer
337 views

How to properly post style to geoserver

I'm trying to post a new SLD style to geoserver and associate it to an existing layer, but keep getting errors. I'm doing the following: curl -v -u XXXX:xxxxx -X POST "http://localhost/geoserver/rest/...
0
votes
0answers
240 views

Publishing PostGIS Tables via Geoserver REST API returns Schema does not exist until I have to ReSave the workspace from Admin UI

I have used the geoserver REST API to Create Workspace/Namespace ->> the Create datastore (Postgis) and now trying to publish a layer via REST still. I get an error when I try to publish the Postgis ...
3
votes
0answers
151 views

Geoserver+postgis: how to complete creating database via REST API?

I'm using geoserver 2.13.1 with postgres 9.5 and postgis 2.4.2. I am trying to use REST api to create workspace (works) and in it a datastore of postgis type. I have already prepared a template ...
2
votes
1answer
59 views

GeoServer: Creating a datastore with spaces in the path

I am using the GeoServer REST API to create a datastore. The path that I am using has a space in it. This does not seem to work well in GeoServer 2.11.2 since it generates an "Input type is not ...
0
votes
1answer
123 views

GeoServerRestApi:System.Net.WebException: The remote server returned an error: (406) Not Acceptable

I am using the GeoServer REST API(gsrcc) to add the following SLD XML string to GeoServer 2.13.0: <StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis....
0
votes
1answer
160 views

How to add a GeoWebCache gridset to all layers in GeoServer

I have 300+ layers in my GeoServer layer library, I have just created a custom gridset I would like to use for all of my layers. I don't want to go through my whole library adding the gridset manually ...
1
vote
1answer
185 views

Geoserver layer pyramids in googledrive

is it possible to create pyramid from large rasters and add them with folders to google drive and mount google drive as local drive to geoserver ? i tried to search in internet to find about it and ...
1
vote
1answer
256 views

Geoserver CSV - changing the default comma separator

I would like to know if it is possible to change the default comma separator CSV exportation in Geoserver using semicolon i.e. as a separator. Some of the tables that I published have large text ...
2
votes
1answer
657 views

Selecting service (WMS / WFS) through GeoServer REST API?

Is it possible to select a service (WMS / WFS) through the Geoserver REST-API? I know how to add a workspace through the REST-API, like this curl -v -u admin:geoserver -XPOST -H "Content-type: text/...
3
votes
1answer
362 views

Updating existing GeoServer ImageMosaic with GeoTIFF using REST API

While trying to update an existing ImageMosaic in GeoServer using the REST API, following the documentation (provided here http://docs.geoserver.org/stable/en/user/rest/examples/curl.html#uploading-...
2
votes
2answers
644 views

how to set default style from particular workspace using gsconfig?

I'm able to set default style for any layer using below code cat = Catalog("http://localhost:8080/geoserver/rest", "admin", "geoserver") layer = cat.get_layer("layer_name") layer._set_default_style(...
1
vote
1answer
48 views

Which default formats does GeoServer REST API datasource PUT endpoint accepts?

I'm using the following endpoint to create datasources in Geoserver: PUT /workspaces/{workspaceName}/datastores/{storeName}/{method}.{format} I have been able to create vector datastores from an ...
5
votes
1answer
2k views

Creating Coveragestore GeoTIFF using REST API

I need to create a layer by uploading a GeoTIFF file. After reading Adding a new Coveragestore in a certain Workspace by REST and Programming Geoserver 2.0.2 to add a raster data store and layer ...
3
votes
1answer
251 views

GeoServer Rest does not load band definitions for Coverage

I am running into the a problem with creating a coverage with GeoServer REST API. Somehow when creating the coverage it does not load the band definitions. I tried several thing but so far nothing ...
0
votes
1answer
108 views

How to animate a single raster layer with variable substitution SLD Geoserver?

I was trying to animate a single raster layer with a variable substitution in SLD. I've followed the Geoserver documentation http://docs.geoserver.org/stable/en/user/styling/sld/extensions/...
1
vote
1answer
94 views

GeoServer REST API: how to create an MBTiles datastore

I want to create an MBTiles datastore using the REST API of GeoServer. I was able to create a datastore for a shapefile using: curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "...
2
votes
1answer
251 views

Difference between outcome of REST query through browser and through cURL

I am working with the geoserver rest interface to automate the config of all layers, stores etc. One thing I noticed was that when using a browser and navigating to a layer the outcome is something ...
1
vote
0answers
86 views

Geoserver REST not showing coverages

I'm using the Geoserver REST Service and I want to know the coverages a particular workspace has. If authenticated, everything is working as expected, I can access the endpoint: MY_GEOSERVER/...
1
vote
1answer
137 views

Changing Declared SRS

I am using PostGIS with geoserver. I have been able to publish a shapefile.zip as a layer. The problem is, even though there is a .prj in the zip file, the Declared SRS in Geoserver is EPSG:404000 I ...
2
votes
2answers
946 views

405 Method not Allowed on uploading a shapefile via REST API on GeoServer

I'm using PHP cURL to upload a Shapefile to GeoServer. It works fine in a development server. But when I deploy to Stage server and I try the same I get: 405 Method Not Allowed The requested ...
1
vote
2answers
2k views

GeoServer REST API delete layer

I'm using GeoServer REST API to create a layer from a shapefile. That shapefile needs to be updated on a regular basis. Since there is no replace function on the REST API, I'm trying to delete the ...