REST¶
GeoServer provides a RESTful interface through which clients can retrieve information about an instance and make configuration changes. Using the REST interface’s simple HTTP calls, clients can configure GeoServer without needing to use the Web administration interface.
REST is an acronym for “REpresentational State Transfer”. REST adopts a fixed set of operations on named resources, where the representation of each resource is the same for retrieving and setting information. In other words, you can retrieve (read) data in an XML format and also send data back to the server in similar XML format in order to set (write) changes to the system.
Operations on resources are implemented with the standard primitives of HTTP: GET to read; and PUT, POST, and DELETE to write changes. Each resource is represented as a URL, such as http://GEOSERVER_HOME/rest/workspaces/topp
.
API¶
Warning
The API is documented as Swagger 2.0 files. However, these files have been written by hand back in 2017, and have not always been kept up to date with the evolution of the GeoServer configuration object structure. Also, they have not been tested for proper client generation, and will likely not work for that purpose. Take them only as a form of documentation.
The following links provide direct access to the GeoServer REST API documentation, including definitions and examples of each endpoint:
GeoWebCache:
Importer extension:
Monitor extension:
XSLT extension:
Note
You can also view the original REST configuration API reference section.
Examples¶
This section contains a number of examples which illustrate some of the most common uses of the REST API. They are grouped by endpoint.
- About
- Fonts
- Layer groups
- Layers
- Security
- Styles
- Workspaces
- Stores
- Uploading a new image mosaic
- Updating an image mosaic contents
- Listing image mosaic details
- Removing image mosaic granules
- Uploading an empty mosaic
- Uploading an app-schema mapping file
- Listing app-schema store details
- Uploading a new app-schema mapping configuration file
- Uploading multiple app-schema mapping files
- Cleaning schemas on internal MongoDB stores