Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying GeoServer Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
GeoServer Cookbook

GeoServer Cookbook

By : Iacovella
4.8 (6)
close
close
GeoServer Cookbook

GeoServer Cookbook

4.8 (6)
By: Iacovella

Overview of this book

This book is ideal for GIS experts, developers, and system administrators who have had a first glance at GeoServer and who are eager to explore all its features in order to configure professional map servers. Basic knowledge of GIS and GeoServer is required.
Table of Contents (11 chapters)
close
close
10
Index

Creating and editing data stores with REST


Data stores connect GeoServer to your data. You can't use data that is not supported by GeoServer without a built-in connector or a plugin. Of course, the REST interface supports all operations on data stores. If you plan to automate GeoServer configurations, it is very important to understand how data stores can be created and edited.

The resource exposed is in the following form:

/workspaces/<ws>/datastores

Here, ws stands for the workspace on which the data store is linked.

How to do it…

  1. As usual, you can use the GET operation to retrieve information about which data stores are available in the configuration for a specific workspace. Let's retrieve information in Python:

    >>> myUrl = 'http://localhost:8080/geoserver/rest/workspaces/NaturalEarth/datastores'
    >>> headers = {'Accept': 'text/xml'}
    >>> resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
    
  2. Now do the same with cURL:

    $ curl -u admin:geoserver...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY