### Run GeoServer container with extensions installed
Source: https://docs.geoserver.org/latest/en/user/installation/docker/
Starts the container with INSTALL_EXTENSIONS=true and STABLE_EXTENSIONS set to a comma-separated list of extension names. The container downloads and installs the specified extensions during startup.
```bash
docker run -it -p 8080:8080 \
--env INSTALL_EXTENSIONS=true \
--env STABLE_EXTENSIONS="ysld,ogcapi-features" \
docker.osgeo.org/geoserver:3.1.x
```
--------------------------------
### Example ogr2ogrLocation for Windows FWTools
Source: https://docs.geoserver.org/latest/en/user/extensions/ogr/
Example of setting the full path to the ogr2ogr executable when it is not in the default path, as on a Windows box with FWTools installed.
```xml
c:\Programmi\FWTools2.2.8\bin\ogr2ogr.exe
```
--------------------------------
### from Parameter Examples
Source: https://docs.geoserver.org/latest/en/user/extensions/monitoring/query/
Examples of using the from parameter to specify an inclusive lower bound on the request start timestamp, with precision to any desired level.
```http
requests.html?from=2010-07-23T16:16:44
```
```http
requests.html?from=2010-07-23
```
--------------------------------
### Configure data directory loader with system properties
Source: https://docs.geoserver.org/latest/en/user/datadirectory/setting/
Example of setting CATALINA_OPTS to enable the loader and use 4 threads when starting GeoServer.
```bash
# Start GeoServer with customized loader settings
CATALINA_OPTS="${CATALINA_OPTS} -DGEOSERVER_DATA_DIR_LOADER_ENABLED=true -DGEOSERVER_DATA_DIR_LOADER_THREADS=4"
```
--------------------------------
### ListStoredQueries GET request example
Source: https://docs.geoserver.org/latest/en/user/services/wfs/reference/
Lists all stored queries on the server using a GET request. Valid for WFS version 2.0.0 only.
```HTTP
http://example.com/geoserver/wfs?
request=ListStoredQueries&
service=wfs&
version=2.0.0
```
--------------------------------
### Example gdalData for Windows FWTools
Source: https://docs.geoserver.org/latest/en/user/extensions/ogr/
Example of setting the GDAL data directory when GDAL_DATA is not set, as on a Windows box with FWTools installed.
```xml
c:\Programmi\FWTools2.2.8\data
```
--------------------------------
### Start a full backup: response with execution id
Source: https://docs.geoserver.org/latest/en/user/community/backuprestore/usagerest/
Example response from the backup POST request. Shows the execution id (0), status STARTED, progress 1/8, and the archive file path. Use the id to poll status and download the archive.
```json
{
"backup": {
"execution": {
"id": 0,
"status": "STARTED",
"progress": "1/8",
"archiveFile": "/var/backups/geoserver/backup1.zip",
"overwrite": true,
"options": {
"option": ["OVERWRITE=true"]
}
}
}
}
```
--------------------------------
### Start GeoServer
Source: https://docs.geoserver.org/latest/en/user/installation/linux/
Change into the geoserver/bin directory and execute the startup.sh script to start GeoServer.
```bash
cd geoserver/bin
sh startup.sh
```
--------------------------------
### Start GeoServer with monitor and monitor-kafka extensions
Source: https://docs.geoserver.org/latest/en/user/community/monitor-kafka/usage/
Run this Maven command from the src/web/app directory to start GeoServer with the monitor and monitor-kafka extensions. Initializes the data directory and starts GeoServer.
```bash
mvn jetty:run -P monitor,monitor-kafka
```
--------------------------------
### to Parameter Examples
Source: https://docs.geoserver.org/latest/en/user/extensions/monitoring/query/
Examples of using the to parameter to specify an inclusive upper bound on the request start timestamp, with precision to any desired level.
```http
requests.html?to=2010-07-24T00:00:00
```
```http
requests.html?to=2010-07-24
```
--------------------------------
### GetCapabilities GET request example
Source: https://docs.geoserver.org/latest/en/user/services/wcs/reference/
A typical GetCapabilities request using a GET request to a WCS server at http://www.example.com/wcs. It includes the required service, AcceptVersions, and request parameters.
```http
http://www.example.com/wcs?
service=wcs&
AcceptVersions=1.1.0&
request=GetCapabilities
```
--------------------------------
### Configure data directory loader with environment variables
Source: https://docs.geoserver.org/latest/en/user/datadirectory/setting/
Example shell commands to disable the optimized loader and set the number of threads to 8 before starting GeoServer.
```bash
# Disable the optimized loader
export GEOSERVER_DATA_DIR_LOADER_ENABLED=false
# Use 8 threads for loading
export GEOSERVER_DATA_DIR_LOADER_THREADS=8
# Start GeoServer
./bin/startup.sh
```
--------------------------------
### Build and install ZLIB for NetCDF-4
Source: https://docs.geoserver.org/latest/en/user/extensions/netcdf-out/nc4/
Configure and install ZLIB with a prefix of /work/libs/nc4libs. The 'make check install' command runs tests and installs.
```bash
./configure --prefix=/work/libs/nc4libs
make check install
```
--------------------------------
### Example filename with elevation
Source: https://docs.geoserver.org/latest/en/user/tutorials/imagemosaic_timeseries/imagemosaic_time-elevationseries/
An example filename used in the tutorial: gfs50kmTemperature20130310T180000000Z_0600.000_.tiff. The elevation part is '0600.000'.
```text
gfs50kmTemperature20130310T180000000Z_0600.000_.tiff
```
--------------------------------
### Run GeoServer Docker container with Keycloak plugin
Source: https://docs.geoserver.org/latest/en/user/community/keycloak/installing/
Use this Docker command to start a GeoServer container with the Keycloak roles plugin installed as a community extension. Set INSTALL_EXTENSIONS=true and specify the plugin name in COMMUNITY_EXTENSIONS.
```bash
docker run -it -p 8080:8080 \
--env INSTALL_EXTENSIONS=true \
--env COMMUNITY_EXTENSIONS="sec-keycloak-roles-plugin" \
docker.osgeo.org/geoserver:3.1.0-SNAPSHOT
```
--------------------------------
### Install GDAL and Java bindings on Ubuntu
Source: https://docs.geoserver.org/latest/en/user/data/raster/gdal/
Command to install GDAL and its Java bindings on Ubuntu and derivatives using apt.
```bash
sudo apt-get install gdal-bin libgdal-java
```
--------------------------------
### Sample property file for interpolation
Source: https://docs.geoserver.org/latest/en/user/data/app-schema/property-interpolation/
Sample property file providing values for the properties used in the mapping file example. These properties can be installed in WEB-INF/classes/app-schema.properties.
```Properties
example.host = database.example.com
example.database = example
example.user = dbuser
example.passwd = s3cr3t
```
--------------------------------
### offset Parameter Example
Source: https://docs.geoserver.org/latest/en/user/extensions/monitoring/query/
Example of using the offset parameter to specify where in the result set to start returning records.
```http
requests.html?count=100&offset=500
```
--------------------------------
### Example settings in /etc/default/geoserver
Source: https://docs.geoserver.org/latest/en/user/production/linuxscript/
Create this file to set environment variables for the GeoServer init script. Adjust the values to match your environment, such as the user, data directory, GeoServer home, Java home, and Java options.
```bash
USER=geoserver
GEOSERVER_DATA_DIR=/home/$USER/data_dir
GEOSERVER_HOME=/home/$USER/geoserver
JAVA_HOME=/usr/lib/jvm/java-6-sun
JAVA_OPTS="-Xms128m -Xmx512m"
```
--------------------------------
### HTML link example for description.ftl
Source: https://docs.geoserver.org/latest/en/user/extensions/kml/tutorials/kmlplacemark/
Example of adding a simple HTML link to the template. This will be rendered as a clickable link in the placemark description.
```html
Provided by the The Open Planning Project.
```
--------------------------------
### Complete point_example.json with dynamic icon-size
Source: https://docs.geoserver.org/latest/en/user/styling/workshop/mbstyle/done/
This is the provided example file 'point_example.json' that rewrites the Dynamic Styling example. It includes a categorical function for 'icon-image' and an exponential function for 'icon-size' based on 'SCALERANK'.
```json
{
"id": "point_example", "type": "symbol", "source-layer": "ne:populated_places", "layout": { "icon-image": { "type": "categorical", "property": "FEATURECLA", "default": "grey_circle", "stops": [ ["Admin-0 capital", "star"] ] }, "icon-size": { "property": "SCALERANK", "type": "exponential", "stops": [ [0, 2.5], [10, 1] ] }, }
}
```
--------------------------------
### Example output of ogr2ogr --help (FWTools 2.2.8)
Source: https://docs.geoserver.org/latest/en/user/extensions/ogr/
Example output from running ogr2ogr --help using the FWTools 2.2.8 distribution. It lists the usage and supported output formats.
```text
Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update] [-gt n]
[-select field_list] [-where restricted_where]
[-sql ]
[-spat xmin ymin xmax ymax] [-preserve_fid] [-fid FID]
[-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def]
[-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]
[-segmentize max_dist]
dst_datasource_name src_datasource_name
[-lco NAME=VALUE] [-nln name] [-nlt type] [layer [layer ...]]
-f format_name: output file format name, possible values are:
-f "ESRI Shapefile"
-f "MapInfo File"
-f "TIGER"
-f "S57"
-f "DGN"
-f "Memory"
-f "BNA"
-f "CSV"
-f "GML"
-f "GPX"
-f "KML"
-f "GeoJSON"
-f "Interlis 1"
-f "Interlis 2"
-f "GMT"
-f "SQLite"
-f "ODBC"
-f "PostgreSQL"
-f "MySQL"
-f "Geoconcept"
-append: Append to existing layer instead of creating new if it exists
-overwrite: delete the output layer and recreate it empty
-update: Open existing output datasource in update mode
-select field_list: Comma-delimited list of fields from input layer to
copy to the new layer (defaults to all)
-where restricted_where: Attribute query (like SQL WHERE)
-sql statement: Execute given SQL statement and save result.
-skipfailures: skip features or layers that fail to convert
-gt n: group n features per transaction (default 200)
-spat xmin ymin xmax ymax: spatial query extents
-segmentize max_dist: maximum distance between 2 nodes.
Used to create intermediate points
-dsco NAME=VALUE: Dataset creation option (format specific)
-lco NAME=VALUE: Layer creation option (format specific)
-nln name: Assign an alternate name to the new layer
-nlt type: Force a geometry type for new layer. One of NONE, GEOMETRY,
POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTIPOINT,
MULTIPOLYGON, or MULTILINESTRING. Add "25D" for 3D layers.
Default is type of source layer.
-a_srs srs_def: Assign an output SRS
-t_srs srs_def: Reproject/transform to this SRS on output
-s_srs srs_def: Override source SRS
Srs_def can be a full WKT definition (hard to escape properly),
or a well known definition (ie. EPSG:4326) or a file with a WKT
definition.
```
--------------------------------
### Vocab properties file example
Source: https://docs.geoserver.org/latest/en/user/data/app-schema/cql-functions/
Example properties file for the Vocab function, mapping abbreviations to vocabulary URIs.
```properties
1GRAV=urn:cgi:classifier:CGI:SimpleLithology:2008:gravel
1TILL=urn:cgi:classifier:CGI:SimpleLithology:2008:diamictite
6ALLU=urn:cgi:classifier:CGI:SimpleLithology:2008:sediment
```
--------------------------------
### DropStoredQuery GET request example
Source: https://docs.geoserver.org/latest/en/user/services/wfs/reference/
Drops a stored query with ID 'myStoredQuery' using a GET request. Valid for WFS version 2.0.0 only.
```HTTP
http://example.com/geoserver/wfs?
request=DropStoredQuery&
storedQuery_Id=myStoredQuery
```
--------------------------------
### Start a full backup: backup_post.json configuration
Source: https://docs.geoserver.org/latest/en/user/community/backuprestore/usagerest/
JSON configuration file for starting a full backup. Specifies the archive file path and overwrite flag. With no options specified, defaults apply.
```json
{
"backup": {
"archiveFile": "/var/backups/geoserver/backup1.zip",
"overwrite": true,
"options": {}
}
}
```
--------------------------------
### download.properties configuration example
Source: https://docs.geoserver.org/latest/en/user/extensions/wps-download/
Example configuration for the WPS Download extension, stored in download.properties in the GeoServer data directory. Limits include maxFeatures, rasterSizeLimits, writeLimits, hardOutputLimit, compressionLevel, and maxAnimationFrames. The file is watched and reloaded on modification.
```properties
# Max #of features
maxFeatures=100000
#8000 px X 8000 px
rasterSizeLimits=64000000
#8000 px X 8000 px X 3 bands X 1 byte per band = 192MB
writeLimits=192000000
# 50 MB
hardOutputLimit=52428800
# STORE =0, BEST =8
compressionLevel=4
# When set to 0 or below, no limit
maxAnimationFrames=1000
```
--------------------------------
### Poll the status of an execution: completed backup response
Source: https://docs.geoserver.org/latest/en/user/community/backuprestore/usagerest/
Example response for a completed backup. Shows status COMPLETED, progress 8/8, timings, exit status, and step executions. The status can be STARTING, STARTED, STOPPING, STOPPED, COMPLETED, FAILED, or ABANDONED. Keep polling while STARTING or STARTED.
```json
{
"backup": {
"execution": {
"id": 0,
"status": "COMPLETED",
"progress": "8/8",
"startTime": "2026-06-06T10:21:14.802",
"endTime": "2026-06-06T10:21:25.356",
"exitStatus": {
"exitCode": "COMPLETED",
"exitDescription": ""
},
"stepExecutions": {
"step": [
{
"name": "backupWorkspacesAndLayers",
"status": "COMPLETED",
"exitStatus": { "exitCode": "COMPLETED", "exitDescription": "" },
"readCount": 12,
"writeCount": 12,
"failureExceptions": ""
}
]
},
"archiveFile": "/var/backups/geoserver/backup1.zip"
}
}
}
```
--------------------------------
### Example output of gdalinfo --version
Source: https://docs.geoserver.org/latest/en/user/data/raster/gdal/
Example output from the gdalinfo --version command, showing GDAL 3.4.1.
```text
GDAL 3.4.1, released 2021/12/27
```
--------------------------------
### Create description.ftl with Hello World content
Source: https://docs.geoserver.org/latest/en/user/extensions/kml/tutorials/kmlplacemark/
Start a new file named description.ftl and add the text 'Hello World!' as the template content. Save it in the workspaces/topp/states_shapefile/states directory of the GeoServer data directory (GEOSERVER_DATA_DIR).
```plaintext
Hello World!
```
--------------------------------
### Start Kafka broker and schema registry with docker-compose
Source: https://docs.geoserver.org/latest/en/user/community/monitor-kafka/usage/
Run this command from the test resources directory to start Kafka and schema registry containers. Requires Docker and docker-compose.
```bash
# start kafka
cd src/community/monitor-kafka/src/test/resources
docker-compose up -d
```
--------------------------------
### DescribeStoredQueries GET request example
Source: https://docs.geoserver.org/latest/en/user/services/wfs/reference/
Describes the stored query with ID 'urn:ogc:def:query:OGC-WFS::GetFeatureById' using a GET request. Valid for WFS version 2.0.0 only.
```HTTP
http://example.com/geoserver/wfs?
request=DescribeStoredQueries&
storedQuery_Id=urn:ogc:def:query:OGC-WFS::GetFeatureById
```
--------------------------------
### Example ISO Metadata Profile Mapping File
Source: https://docs.geoserver.org/latest/en/user/extensions/csw-iso/mapping/
Example mapping file showing how to map catalog fields to ISO metadata elements. Uses full paths, @ for attributes, % for multi-valued mappings, [] for indexes, $ for mandatory fields, and functions like lapply and typeOf.
```properties
@fileIdentifier.CharacterString=id
identificationInfo.MD_DataIdentification.citation.CI_Citation.title.CharacterString=title
identificationInfo.MD_DataIdentification.citation.CI_Citation.alternateTitle.CharacterString=list(description,alias,strConcat('##',title))
identificationInfo.MD_DataIdentification.descriptiveKeywords.MD_Keywords.keyword.CharacterString=keywords
identificationInfo.MD_DataIdentification.abstract.CharacterString=abstract
$dateStamp.Date= if_then_else ( isNull("metadata.date") , 'Unknown', "metadata.date")
hierarchyLevel.MD_ScopeCode.@codeListValue='http://purl.org/dc/dcmitype/Dataset'
$contact.CI_ResponsibleParty.individualName.CharacterString=
identificationInfo.MD_DataIdentification.resourceConstraints[0].MD_LegalConstraints.accessConstraints.MD_RestrictionCode=
identificationInfo.MD_DataIdentification.resourceConstraints[1].MD_SecurityConstraints.classification.MD_ClassificationCode=
identificationInfo.MD_DataIdentification.citation.CI_Citation.date%.CI_Date.date.Date=lapply("metadata.citation-date", if_then_else(isNull("."), "Expression/NIL", dateFormat('YYYY-MM-dd', ".")))
identificationInfo.MD_DataIdentification.descriptiveKeywords.MD_Keywords.keyword.CharacterString=list(keywords, if_then_else(equalTo(typeOf("."), 'FeatureTypeInfo'), 'vector', 'raster'))
```
--------------------------------
### Get a provider response (JSON)
Source: https://docs.geoserver.org/latest/en/user/rest/authenticationproviders/
Example JSON response for retrieving a specific authentication provider.
```json
{
"id": "52857278:13c7ffd66a8:-7ff0",
"name": "default",
"className": "org.geoserver.security.auth.UsernamePasswordAuthenticationProvider",
"userGroupServiceName": "default"
}
```
--------------------------------
### Initialize the store by listing available coverages
Source: https://docs.geoserver.org/latest/en/user/community/cog/mosaic/
Sends a GET request to list available coverages for the COG mosaic store. The response is an XML list containing the coverage name 'modisvi'.
```bash
curl -v -u admin:geoserver -XGET http://localhost:8080/geoserver/rest/workspaces/test/coveragestores/modisvi/coverages.xml?list=all
```
```xml
modisvi
```
--------------------------------
### Get a provider response (XML)
Source: https://docs.geoserver.org/latest/en/user/rest/authenticationproviders/
Example XML response for retrieving a specific authentication provider.
```xml
52857278:13c7ffd66a8:-7ff0
default
org.geoserver.security.auth.UsernamePasswordAuthenticationProvider
default
```
--------------------------------
### DescribeDomains request URL for testing installation
Source: https://docs.geoserver.org/latest/en/user/extensions/wmts-multidimensional/install/
A simple DescribeDomains request to test if the module is correctly installed. Use this against any layer known by the WMTS service, for example the demo layer tiger:poly_landmarks.
```http
http://localhost:8080/geoserver/gwc/service/wmts?REQUEST=DescribeDomains&Version=1.0.0&Layer=tiger:poly_landmarks&TileMatrixSet=EPSG:4326
```
--------------------------------
### Run the import
Source: https://docs.geoserver.org/latest/en/user/extensions/importer/rest_examples/
Executes the import using a POST request to the import endpoint.
```bash
curl -u admin:geoserver -XPOST \
"http://localhost:8080/geoserver/rest/imports/0"
```
--------------------------------
### GET single transformation response
Source: https://docs.geoserver.org/latest/en/user/extensions/importer/rest_reference/
Example JSON response from a GET request to /imports/{importId}/tasks/{taskId}/transforms/{transformId}, showing a single ReprojectTransform with source null and target EPSG:4326.
```json
Status: 200 OK
Content-Type: application/json
{
"type": "ReprojectTransform",
"href": "http://localhost:8080/geoserver/rest/imports/0/tasks/1/transforms/0",
"source": null,
"target": "EPSG:4326"
}
```
--------------------------------
### OGC filter encoded in GET request (FES 2.0)
Source: https://docs.geoserver.org/latest/en/user/services/wms/vendor/
Example of an OGC filter encoding standard 2.0 in a GET request. The filter uses PropertyIsLike with wildCard '*', singleChar '.', and escapeChar '!' on the NAME property.
```text
filter=%3Cfes%3AFilter%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%20xmlns%3Awfs%3D%22http%3A%2F%2Fwww.opengis.net%2Fwfs%22%20xmlns%3D%22http%3A%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns%3Afes%3D%22http%3A%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%3E%3Cfes%3APropertyIsLike%20wildCard%3D%22*%22%20singleChar%3D%22.%22%20escapeChar%3D%22!%22%3E%3Cfes%3AValueReference%3ENAME%3C%2Ffes%3AValueReference%3E%3Cfes%3ALiteral%3E*United*%3C%2Ffes%3ALiteral%3E%3C%2Ffes%3APropertyIsLike%3E%3C%2Ffes%3AFilter%3E
```
--------------------------------
### Setup PostGIS datastore for import
Source: https://docs.geoserver.org/latest/en/user/extensions/importer/rest_examples/
JSON payload to create a PostGIS datastore named 'postgis' in the 'cite' workspace with connection parameters.
```json
{
"dataStore": {
"name": "postgis",
"type": "PostGIS",
"workspace": {
"name": "cite"
},
"connectionParameters": {
"entry": [
{"@key": "schema","$": "public"},
{"@key": "database","$": "postgres"},
{"@key": "host","$": "localhost"},
{"@key": "port","$": "5432"},
{"@key": "passwd","$": "postgres"},
{"@key": "dbtype","$": "postgis"},
{"@key": "user","$": "postgres"},
{"@key": "Estimated extends","$": "true"},
{"@key": "encode functions","$": "true"},
{"@key": "Loose bbox","$": "true"},
{"@key": "Method used to simplify geometries","$": "PRESERVETOPOLOGY"},
{"@key": "Support on the fly geometry simplification","$": "true"},
{"@key": "validate connections","$": "true"},
{"@key": "Connection timeout","$": "20"},
{"@key": "min connections","$": "1"},
{"@key": "max connections","$": "10"},
{"@key": "Evictor tests per run","$": "3"},
{"@key": "Test while idle","$": "true"},
{"@key": "Max connection idle time","$": "300"}
]
},
"_default": true
}
}
```
--------------------------------
### GET transformations list response
Source: https://docs.geoserver.org/latest/en/user/extensions/importer/rest_reference/
Example JSON response from a GET request to /imports/{importId}/tasks/{taskId}/transforms, showing a list of transformations with type, href, source, target, field, and format attributes.
```json
Status: 200 OK
Content-Type: application/json
{
"transforms": [
{
"type": "ReprojectTransform",
"href": "http://localhost:8080/geoserver/rest/imports/0/tasks/1/transforms/0",
"source": null,
"target": "EPSG:4326"
},
{
"type": "DateFormatTransform",
"href": "http://localhost:8080/geoserver/rest/imports/0/tasks/1/transforms/1",
"field": "date",
"format": "yyyyMMdd"
}
]
}
```
--------------------------------
### GetPropertyValue GET request example
Source: https://docs.geoserver.org/latest/en/user/services/wfs/reference/
Retrieves the geographic content (the_geom) of features in the topp:states layer using a GET request. Requires WFS version 2.0.0. Alter the valueReference parameter to retrieve a different attribute.
```http
http://example.com/geoserver/wfs?
service=wfs&
version=2.0.0&
request=GetPropertyValue&
typeNames=topp:states&
valueReference=the_geom
```
--------------------------------
### GetDomainValues request with fromValue=2 and response
Source: https://docs.geoserver.org/latest/en/user/extensions/wmts-multidimensional/usage/
Shows the request to get the next page of values starting from value 2, and the response with the next two values (3.0,5.0). The response includes FromValue element indicating the starting point.
```HTTP
http://localhost:8080/geoserver/gwc/service/wmts?request=GetDomainValues&Version=1.0.0&Layer=sampleLayer&domain=elevation&limit=2&fromValue=2
```
```XML
elevation
2
asc
2.0
3.0,5.0
2
```
--------------------------------
### Get list of supported formats with ogr2ogr --help
Source: https://docs.geoserver.org/latest/en/user/extensions/ogr/
Run this command to see the full set of options and supported formats for your ogr2ogr build. The output varies depending on how ogr2ogr was compiled.
```bash
ogr2ogr --help
```
--------------------------------
### GET filter chain JSON response
Source: https://docs.geoserver.org/latest/en/user/rest/api/filterchains/
Example JSON response for a GET request to retrieve the 'web-test-2' filter chain. The response includes the filter chain name, class name, URL patterns, filters, and configuration flags.
```json
{
"filterChain": {
"name": "web-test-2",
"className": "org.geoserver.security.HtmlLoginFilterChain",
"patterns": {
"string": [
"/web/**",
"/gwc/rest/web/**",
"/"
]
},
"filters": {
"string": [
"rememberme",
"form",
"anonymous"
]
},
"disabled": false,
"allowSessionCreation": true,
"requireSSL": false,
"matchHTTPMethod": false,
"position": 0
}
}
```
--------------------------------
### monitor.properties example for Apache Kafka
Source: https://docs.geoserver.org/latest/en/user/community/monitor-kafka/configuration/
Example monitor.properties file configured to use Apache Kafka. Sets storage to kafka, specifies bootstrap servers, topic, and producer properties like acks, retries, batch size, linger.ms, compression type, and schema registry URL.
```properties
storage=kafka
... other properties ...
kafka.bootstrap.servers=localhost:9092
kafka.topic=monitor
kafka.acks=1
kafka.retries=3
kafka.batch.size=65536
kafka.linger.ms=200
kafka.compression.type=snappy
kafka.schema.registry.url=http://localhost:8081
```
--------------------------------
### Environment variable configuration example
Source: https://docs.geoserver.org/latest/en/user/community/gdal/
Shows how to define environment variables, such as GDAL_DATA, to be set before invoking gdal_translate.
```xml
```
--------------------------------
### GetCapabilities request URL
Source: https://docs.geoserver.org/latest/en/user/services/wps/operations/
Example HTTP GET request to retrieve the WPS capabilities document. Requires parameters service=WPS, version=1.0.0, and request=GetCapabilities.
```http
http://localhost:8080/geoserver/ows?
service=WPS&
version=1.0.0&
request=GetCapabilities
```
--------------------------------
### Start a full backup: cURL POST request
Source: https://docs.geoserver.org/latest/en/user/community/backuprestore/usagerest/
Posts the backup configuration to the GeoServer REST API. Authenticates as admin and expects a 201 Created response with the new execution.
```bash
curl -u admin:geoserver -H "Content-Type: application/json" \
-X POST -d @backup_post.json \
"http://localhost:8080/geoserver/rest/br/backup"
```
--------------------------------
### INSPIRE ExtendedCapabilities XML example
Source: https://docs.geoserver.org/latest/en/user/extensions/inspire/using/
Example of the ExtendedCapabilities block added to WFS and WCS capabilities documents when the INSPIRE extension is installed and configured. Shows the structure with MetadataUrl, SupportedLanguages, ResponseLanguage, and SpatialDataSetIdentifier. The spatial data identifiers section is mandatory and must be provided by the user.
```xml
http://mysite.org/csw?SERVICE=CSW&REQUEST=GetRecord
application/vnd.iso.19139+xml
eng
fre
eng
fc929094-8a30-2617-e044-002128a47908
http://metadata.mysite.org/ds
```
--------------------------------
### Example controlflow.properties rules
Source: https://docs.geoserver.org/latest/en/user/extensions/controlflow/
Shows three example rules: limiting WCS requests, WMS GetMap requests, and WFS GetFeature with Excel output.
```properties
# don't allow more than 16 WCS requests in parallel
ows.wcs=16
# don't allow more than 8 GetMap requests in parallel
ows.wms.getmap=8
# don't allow more than 2 WFS GetFeature requests with Excel output format
ows.wfs.getfeature.application/msexcel=2
```
--------------------------------
### sortBy example for layer groups with empty spec
Source: https://docs.geoserver.org/latest/en/user/services/wms/vendor/
For layer groups, the sort specification is copied to all internal layers, so it must be valid for all of them. An empty spec can be used for a layer group, as shown here where theGroup gets an empty spec and theLayer gets a sort by date ascending.
```text
layers=theGroup,theLayer&sortBy=(),(date A)
```
--------------------------------
### live Parameter Example
Source: https://docs.geoserver.org/latest/en/user/extensions/monitoring/query/
Example of using the live parameter to return only live (currently executing) requests. Requires a Monitor Mode that maintains real-time request information (live or mixed).
```http
requests.html?live=yes
```
--------------------------------
### Custom executable path example
Source: https://docs.geoserver.org/latest/en/user/community/gdal/
Shows how to set the executable to a full path when gdal_translate is not in the default path, e.g., for a custom GDAL build on Linux.
```xml
/usr/local/bin/gdal_translate
```
--------------------------------
### Basic raster symbolizer with opacity
Source: https://docs.geoserver.org/latest/en/user/styling/workshop/ysld/raster/
Initial YSLD style for raster data. Sets opacity to 1.0. Used as a starting point for the image example.
```yaml
symbolizers:
- raster:
opacity: 1.0
```
--------------------------------
### Dataset schema example
Source: https://docs.geoserver.org/latest/en/user/services/wfs/schemamapping/
Shows the internal schema of a dataset with attributes intProperty, stringProperty, floatProperty, and geometry. This is the input that gets mapped to an XML schema.
```text
myDataset(intProperty:Integer, stringProperty:String, floatProperty:Float, geometry:Point)
```
--------------------------------
### Start a full backup
Source: https://docs.geoserver.org/latest/en/user/community/backuprestore/usagerest/
Starts a full backup by POSTing a JSON configuration to the /rest/br/backup endpoint. The response includes an execution ID used for polling and downloading the archive.
```APIDOC
## POST /rest/br/backup
### Description
Starts a full backup of the GeoServer configuration. The request body specifies the archive file path and options. The response contains an execution object with an ID to track the backup.
### Method
POST
### Endpoint
`/rest/br/backup`
### Parameters
#### Request Body
- **backup** (object) - Required - The backup configuration.
- **archiveFile** (string) - Required - The file path where the backup archive will be written.
- **overwrite** (boolean) - Optional - Whether to overwrite an existing archive. Defaults to false.
- **options** (object) - Optional - Additional backup options. Empty object uses defaults.
### Request Example
```json
{
"backup": {
"archiveFile": "/var/backups/geoserver/backup1.zip",
"overwrite": true,
"options": {}
}
}
```
### Response
#### Success Response (201 Created)
- **backup** (object) - The backup execution details.
- **execution** (object) - The execution object.
- **id** (integer) - The execution ID.
- **status** (string) - The current status (e.g., STARTED).
- **progress** (string) - Progress indicator (e.g., "1/8").
- **archiveFile** (string) - The archive file path.
- **overwrite** (boolean) - Whether overwrite was set.
- **options** (object) - The applied options.
#### Response Example
```json
{
"backup": {
"execution": {
"id": 0,
"status": "STARTED",
"progress": "1/8",
"archiveFile": "/var/backups/geoserver/backup1.zip",
"overwrite": true,
"options": {
"option": ["OVERWRITE=true"]
}
}
}
}
```
```
--------------------------------
### Rules JSON example
Source: https://docs.geoserver.org/latest/en/user/rest/api/accesscontrol/
JSON format for GET, POST, and PUT on the rules endpoints. The keys are rule resources and the values are comma-separated roles or an asterisk.
```JSON
{
"*.*.r": "*",
"myworkspace".*.w": "ROLE_1,ROLE_2"
}
```
--------------------------------
### Response to GET /imports/0/tasks
Source: https://docs.geoserver.org/latest/en/user/extensions/importer/rest_reference/
Example JSON response for a successful task list retrieval. Shows a task with id 0, href, and state READY.
```json
Status: 200 OK
Content-Type: application/json
{
"tasks": [
{
"id": 0,
"href": "http://localhost:8080/geoserver/rest/imports/2/tasks/0",
"state": "READY"
}
]
}
```
--------------------------------
### curl command to start import
Source: https://docs.geoserver.org/latest/en/user/extensions/importer/rest_examples/
Curl command to initiate the import by POSTing to the import resource. Executed after checking all tasks are ready.
```bash
curl -u admin:geoserver -XPOST \
"http://localhost:8080/geoserver/rest/imports/9"
```
--------------------------------
### Dynamic palette file example (red to blue progression)
Source: https://docs.geoserver.org/latest/en/user/community/ncwms/
Example palette file defining a red to blue color progression. Each line contains a color in #RRGGBB format, and comments start with a percentage sign. This palette is used to generate a dynamic colormap for raster data.
```text
% Red to blue progression
#FF0000
#0000FF
```
--------------------------------
### Example collections.json with a single collection
Source: https://docs.geoserver.org/latest/en/user/community/ogc-api/3dgeovolumes/
Example configuration file for the 3D GeoVolumes service. It defines a collection with id, title, description, collectiontype, extent (spatial bbox and CRS), and content entries. The file can be updated while GeoServer is running and will be picked up automatically. Mandatory elements for HTML templates are id, title, description, a 3D bbox, and at least one content entry.
```json
{
"collections": [
{
"id": "NewYork",
"title": "NewYork",
"description": "All Supported 3D Containers for the city of NewYork. Please zoom on Manhattan when using the Cesium viewer, only have zoom level 14.",
"collectiontype": "3d-container",
"extent": {
"spatial": {
"bbox": [
[
-74.01900887327089,
40.700475291581974,
-11.892070104139751,
-73.9068954348699,
40.880256294183646,
547.7591871983744
]
],
"crs": "http://www.opengis.net/def/crs/OGC/0/CRS84h"
}
},
"content": [
{
"title": "NewYork - 3D Buildings Manhattan: 3D Tiles",
"rel": "original",
"href": "NewYork/3dtiles/tileset.json",
"type": "application/json+3dtiles"
},
{
"title": "NewYork - 3D Buildings Manhattan: i3s",
"rel": "original",
"href": "https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_NewYork_17/SceneServer/layers/0/",
"type": "application/json+i3s"
}
]
}
]
}
```
--------------------------------
### Successful DescribeDomains response with no domains
Source: https://docs.geoserver.org/latest/en/user/extensions/wmts-multidimensional/install/
Expected response when the module is installed correctly. This example shows a layer without any domains, returning an empty SpaceDomain with a BoundingBox.
```xml
```
--------------------------------
### Create indexes and tracking table for PostGIS database
Source: https://docs.geoserver.org/latest/en/user/community/opensearch-eo/installation/
Run this SQL script to create the necessary indexes on the product table and the queryable_idx_tracker table. The script includes a GIST index on the footprint column, GIN indexes on atmospheric attributes, and regular indexes on EO, optical, SAR, and time columns. It also creates the queryable_idx_tracker table with indexes on index_name and collection.
```sql
-- index all (really, this is a search engine)
-- manually generated indexes
create index "idx_product_footprint" on product using GIST("footprint");
-- the following indexes have been generated adding
-- SELECT 'CREATE INDEX "idx_' || table_name || '_' || column_name || '" ON ' || table_name || ' ("' || column_name || '");' FROM information_schema.columns WHERE table_name = 'product' and column_name like 'eo%' or column_name like 'opt%' or column_name like 'sar%' or column_name like 'time%';
CREATE INDEX "idx_product_timeStart" ON product ("timeStart");
CREATE INDEX "idx_product_timeEnd" ON product ("timeEnd");
CREATE INDEX "idx_product_eoParentIdentifier" ON product ("eoParentIdentifier");
CREATE INDEX "idx_product_eoParentIdentifier_timeEnd_timeStart" ON product("eoParentIdentifier","timeEnd","timeStart");
CREATE INDEX "idx_product_eoProductionStatus" ON product ("eoProductionStatus");
CREATE INDEX "idx_product_eoAcquisitionType" ON product ("eoAcquisitionType");
CREATE INDEX "idx_product_eoOrbitNumber" ON product ("eoOrbitNumber");
CREATE INDEX "idx_product_eoOrbitDirection" ON product ("eoOrbitDirection");
CREATE INDEX "idx_product_eoTrack" ON product ("eoTrack");
CREATE INDEX "idx_product_eoFrame" ON product ("eoFrame");
CREATE INDEX "idx_product_eoSwathIdentifier" ON product ("eoSwathIdentifier");
CREATE INDEX "idx_product_optCloudCover" ON product ("optCloudCover");
CREATE INDEX "idx_product_optSnowCover" ON product ("optSnowCover");
CREATE INDEX "idx_product_eoProductQualityStatus" ON product ("eoProductQualityStatus");
CREATE INDEX "idx_product_eoProductQualityDegradationStatus" ON product ("eoProductQualityDegradationStatus");
CREATE INDEX "idx_product_eoProcessorName" ON product ("eoProcessorName");
CREATE INDEX "idx_product_eoProcessingCenter" ON product ("eoProcessingCenter");
CREATE INDEX "idx_product_eoCreationDate" ON product ("eoCreationDate");
CREATE INDEX "idx_product_eoModificationDate" ON product ("eoModificationDate");
CREATE INDEX "idx_product_eoProcessingDate" ON product ("eoProcessingDate");
CREATE INDEX "idx_product_eoSensorMode" ON product ("eoSensorMode");
CREATE INDEX "idx_product_eoArchivingCenter" ON product ("eoArchivingCenter");
CREATE INDEX "idx_product_eoProcessingMode" ON product ("eoProcessingMode");
CREATE INDEX "idx_product_eoAvailabilityTime" ON product ("eoAvailabilityTime");
CREATE INDEX "idx_product_eoAcquisitionStation" ON product ("eoAcquisitionStation");
CREATE INDEX "idx_product_eoAcquisitionSubtype" ON product ("eoAcquisitionSubtype");
CREATE INDEX "idx_product_eoStartTimeFromAscendingNode" ON product ("eoStartTimeFromAscendingNode");
CREATE INDEX "idx_product_eoCompletionTimeFromAscendingNode" ON product ("eoCompletionTimeFromAscendingNode");
CREATE INDEX "idx_product_eoIlluminationAzimuthAngle" ON product ("eoIlluminationAzimuthAngle");
CREATE INDEX "idx_product_eoIlluminationZenithAngle" ON product ("eoIlluminationZenithAngle");
CREATE INDEX "idx_product_eoIlluminationElevationAngle" ON product ("eoIlluminationElevationAngle");
CREATE INDEX "idx_product_sarPolarisationMode" ON product ("sarPolarisationMode");
CREATE INDEX "idx_product_sarPolarisationChannels" ON product ("sarPolarisationChannels");
CREATE INDEX "idx_product_sarAntennaLookDirection" ON product ("sarAntennaLookDirection");
CREATE INDEX "idx_product_sarMinimumIncidenceAngle" ON product ("sarMinimumIncidenceAngle");
CREATE INDEX "idx_product_sarMaximumIncidenceAngle" ON product ("sarMaximumIncidenceAngle");
CREATE INDEX "idx_product_sarDopplerFrequency" ON product ("sarDopplerFrequency");
CREATE INDEX "idx_product_sarIncidenceAngleVariation" ON product ("sarIncidenceAngleVariation");
CREATE INDEX "idx_product_eoResolution" ON product ("eoResolution");
CREATE INDEX "idx_product_atmVerticalRange" on product using GIN("atmVerticalRange");
CREATE INDEX "idx_product_atmVerticalResolution" on product using GIN("atmVerticalResolution");
CREATE INDEX "idx_product_atmSpecies" on product using GIN("atmSpecies");
CREATE INDEX "idx_product_atmSpeciesError" on product using GIN("atmSpeciesError");
CREATE INDEX "idx_product_atmAlgorithmName" on product using GIN("atmAlgorithmName");
CREATE INDEX "idx_product_atmAlgorithmVersion" on product using GIN("atmAlgorithmVersion");
-- extra attribute to support heterogeneous CRS mosaic queries
CREATE INDEX "idx_product_crs" ON product ("crs");
--track indices created on queryables
create table queryable_idx_tracker (
"id" serial primary key,
"collection" varchar,
"queryable" varchar,
"expression" varchar,
"index_name" varchar
);
CREATE INDEX "idx_q_tracker_index_name" on queryable_idx_tracker("index_name");
CREATE INDEX "idx_q_tracker_expression" on queryable_idx_tracker("collection");
```
--------------------------------
### jsl74.ini configuration file entry
Source: https://docs.geoserver.org/latest/en/user/data/raster/gdal/
Relevant entry from the jsl74.ini configuration file in the GeoServer installation, showing the command line parameter used to start the service.
```ini
;The java command line
;The entry method below using a parameter list still works but the command line variant is more convenient.
;Everything separated by whitespace on a java command line is broken down into a parameter here.
;You don't need to care about quotes
;around strings containing spaces here. e.g.
cmdline = -cp "..\src" com.roeschter.jsl.TelnetEcho
```
--------------------------------
### Rules XML example
Source: https://docs.geoserver.org/latest/en/user/rest/api/accesscontrol/
XML format for GET, POST, and PUT on the rules endpoints. Each rule element has a resource attribute and a comma-separated list of roles or an asterisk.
```XML
*
ROLE_1,ROLE_2
```