Questions tagged [geoserver-rest-api]

For questions about GeoServer's REST API

Filter by
Sorted by
Tagged with
1
vote
1answer
28 views

GeoServer REST API (geoserver-restconfig) create coverage store and mosaic error

I am working on Ubuntu 18 and using Kartoza GeoServer docker v:2.15. I try to push Landsat band 4 (for sample I have two images epsg_4326) with Python library geoserver-restconfig to GeoServer with ...
0
votes
1answer
46 views

Unable to make POST request to add layer to GeoServer

My issue is related to post request and there is no any issue about get request export const GEOSERVER_URL:string = 'http://localhost:8080/geoserver/rest/workspaces/risk/datastores/scan.tekudb.local/...
1
vote
0answers
24 views

GeoServer 2.15: “REST PathMapper Root directory path” ignored?

I am trying to create stores in my GeoServer setup through the REST API and try to force the store creation to take place in a specific directory by setting the "REST PathMapper Root directory path" ...
0
votes
0answers
12 views

Geoserver rest api CORS policy: No 'Access-Control-Allow-Origin' header issue , in React [duplicate]

I would like to fetch data from React to GeoServer rest/API, however, it gives me that error: blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource I ...
1
vote
0answers
17 views

How to add a raster layer to Geoserver via the REST-API? [duplicate]

I want to automatically (via script) add new TIF-files on the harddrive to Geoserver as a new layer. I use the REST-API for that. In the first step I added the TIF as a coveragestore, and that step ...
0
votes
0answers
19 views

Published layers history (date & time) in GeoServer 2.15.x

Using Windows Environment & having GeoServer 2.15.1 on my side. Is their any way to find our published layer's date using its API? Checked its extensions as well. Checking GeoServer REST API on ...
1
vote
1answer
39 views

How to obtain GeoServer layer's shapefile name using REST API

I have a GeoServer store of type "Directory of Shape Files". I have layers defined in that store corresponding to specific shapefiles. Some of my layers have been renamed. I'm looking for how to ...
1
vote
1answer
26 views

Curl request to get times from layers stored as an image mosaic in GeoServer

I have an image mosaic in GeoServer with some .tif which its name are the date of that raster: 20190929.tif 20191004.tif ... So I can load every raster by passing the date in OpenLayers: date="2019-...
1
vote
1answer
94 views

How to secure WMS/WFS request from Geoserver?

Currently anyone can go to inspect-> network and get my rest url and access my data from geoserver, I want to secure my connection (probably by adding proxy server) so that only authenticated persons ...
1
vote
1answer
56 views

Creating WMS layer with filter using GeoServer REST API

I'm trying to add a new layer to GeoServer using REST API. Here is REST API docs: https://docs.geoserver.org/latest/en/api/#/latest/en/api/1.0.0/wmslayers.yaml Post request body: <?xml ...
1
vote
0answers
81 views

Refresh attributes of a feature type with GeoServer REST API

Using a PostGIS database, I have created a datastore and a featuretype. When I add or remove columns to/from the table, I need to update the featuretype accordingly. Fortunately, I can use the ...
0
votes
1answer
60 views

GeoServer REST API for NetCDF in Python

I am trying to programmatically edit the dimension variable in GeoServer for 200+ NetCDF's. This is how I am trying it: from geoserver.catalog import Catalog cat = Catalog("http://localhost:8080/...
0
votes
0answers
22 views

GeoServer REST create TIFF layer from datastore

I am creating a layer from a TIFF data store with the REST API in GeoServer. The command works if I use <coverage> <name>tiffLayer1</name> <title>tiffLayer1</title> <...
1
vote
1answer
66 views

Set 00000 Input Transparent Color with GeoServer Rest API

I need to change parameters (Input Transparent Color) from layers in GeoServer. I have a lot of images to do it. So, I need to do this edit using GeoServer REST API. I did the code below but it doesn'...
0
votes
0answers
448 views

curl REST API to AJAX

I'm trying to make a web application that is able to : 1) Upload raster data to GeoServer so when I use this command on cmd it works curl -u admin:geoserver -v -XPUT -H "Content-type: image/tiff" --...
0
votes
1answer
45 views

Rename store using REST API

So, it appears that I can rename a store name (both DataStores and CoverageStores) from the WebUI (v2.13.2 and 2.15.2) but I cannot do it via the REST API. It returns a 403 error when I do this: curl ...
0
votes
0answers
36 views

Getting an error in Geonode when adding a new layer from a Geopackage store

I am trying to publish a new layer from a Geopackage store which I created using the following code cat = Catalog("http://localhost:8080/geoserver/rest/") geoserver_workspace = cat.get_workspace("...
0
votes
0answers
18 views

Adding style to a published layer using GeoServer REST API with Node.js [duplicate]

Lets say I have a custom style in GeoServer and after I created a new layer, I want to add the style to that layer. I am using this link for documentation. function editLayerStyle(layerName, body) { ...
2
votes
1answer
135 views

Adding existing style while publishing a new layer in GeoServer using REST API

I have a function which publishes a layer in GeoServer with the REST API. Now I want to add an existing style in the layer while publishing it. Anyone has any idea where I write the style name or ...
0
votes
1answer
28 views

Shapefile creation for GeoServer from cruise track, and serve as layer in Leaflet

I am new to both GeoServer and shapefile, today only I installed (GeoServer) on my CentoOS, I am familiar with Leaflet, I am looking for solution to draw huge cruise track which are already there in ...
2
votes
1answer
33 views

What happens to pending tasks when GeoServer reboots?

I am running a GeoServer/GeoWebCache system on a Windows server. We do regular updates which require retiling and I have an automated system (using Task Scheduler) that sends requests to the ...
1
vote
0answers
25 views

Shapefiles added through GeoServer REST interface contains no features [closed]

I'm using a put request to create a datastore under a workspace, and automatically register the included feature type in a new layer. The put request succeeds, and I can see the datastore points to a ...
1
vote
1answer
238 views

Creating and publishing a new layer in Geoserver using Geoserver Rest API

I want to publish a new layer in Geoserver. The layer seems unpublished and I get 'Undefined' error. const publish = function () { return new Promise((resolve, reject) => { const layer = ...
1
vote
1answer
150 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
0answers
119 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
1answer
35 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
280 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 ...
1
vote
0answers
155 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 ...
3
votes
1answer
382 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="...
1
vote
1answer
665 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
312 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 ...
0
votes
1answer
121 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
0answers
63 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
2answers
203 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 ...
2
votes
1answer
189 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:...
2
votes
1answer
111 views

Enabling tile caching for 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? How to enable tile caching (check box) for a layer under ...
1
vote
1answer
57 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 /*...
1
vote
1answer
233 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?
0
votes
1answer
589 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/...
3
votes
2answers
280 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
76 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
252 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
293 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
62 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 ...
2
votes
2answers
582 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: ...
1
vote
0answers
229 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 ...
0
votes
1answer
170 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/...
2
votes
1answer
570 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
1answer
112 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 "...
1
vote
0answers
98 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/...