Using data stores
Data stores connect GeoServer to your data. You cannot use data that is not supported by GeoServer with a built-in connector or plugin. Of course, the REST interface supports all operations on data stores. The resource exposed is in the form shown as follows:
/workspaces/<ws>/datastores
Here, ws
stands for the workspace to which the data store is linked.
Managing data stores
Did you enjoy using cURL and Python? We hope so, as we are going to use cURL and Python again, since you are now so skilled! So, let's get information about data stores:
- The
GET
operation lets you know which data stores are available in the configuration. Retrieve the information in Python using the following code:
import requests myUrl = 'http://localhost:8080/geoserver/rest/ workspaces/Packt/datastores' headers = {'Accept': 'text/xml'} resp = requests.get(myUrl,auth=('admin','pwd'),headers=headers) if resp.status_code == 200: file = open...