APIs & OGC Standards

GeoServer exposes a comprehensive suite of RESTful APIs and strictly adheres to Open Geospatial Consortium (OGC) specifications. This guide details endpoint structures, compliance levels, authentication methods, and integration examples.

ℹ️ Note

All API endpoints require authentication via API Key or OAuth 2.0. Base URL for the v2 API is https://api.geoserver.io/v2/.

OGC Standards Compliance

GeoServer implements the following OGC standards with certified compliance. Each standard supports both XML and JSON request/response formats where applicable.

Standard Version Compliance Level Endpoint
Web Map Service (WMS) 1.3.0, 1.1.1 Level 1 & 2 /wms
Web Feature Service (WFS) 2.0.0 Level 1 /wfs
Web Coverage Service (WCS) 2.1 Level 1 /wcs
Web Map Tile Service (WMTS) 1.0.0 Level 1 /wmats
Web Processing Service (WPS) 1.0.0 Level 1 /wps
GeoPackage (OGC API) 1.2 Level 1 /ogcapi/geo

REST API Endpoints

The GeoServer REST API provides programmatic access to server configuration, data management, and publishing workflows.

Available Services

Method Endpoint Description
GET /layers List all published layers with metadata
POST /layers/{id}/styles Apply or update SLD/SE styling to a layer
GET /workspaces/{id}/datasets Retrieve datasets within a workspace
PUT /config/security/roles Update role-based access control configuration
GET /health System status, uptime, and node metrics

Authentication & Authorization

All requests must include valid credentials. GeoServer supports multiple authentication schemes:

Code Examples

Python (Requests)

python
import requests # Configure authentication headers = { "Authorization": "Bearer YOUR_ACCESS_TOKEN", "Accept": "application/json" } # Fetch layer metadata response = requests.get( "https://api.geoserver.io/v2/layers/nasa:landcover", headers=headers ) data = response.json() print(f"Layer: {data['name']} | Features: {data['feature_count']}")

cURL (OGC WFS GetFeature)

bash
curl -X GET \ "https://api.geoserver.io/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAME=geo:urban_zones&OUTPUTFORMAT=application/json&MAXFEATURES=10" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
⚠️ Rate Limiting

API requests are limited to 1,000 requests per minute per API key. Exceeding this limit returns 429 Too Many Requests. Implement exponential backoff for batch operations.

OGC API - Features (Draft/Experimental)

GeoServer v2.4 introduces experimental support for the OGC API - Features standard, providing a modern, RESTful alternative to WFS 2.0. The following endpoints are available:

Error Handling

GeoServer uses standard HTTP status codes. Detailed error payloads include a code, message, and details object for debugging.

json
{ "error": { "code": "INVALID_CRS", "message": "Target coordinate reference system is not supported.", "details": { "provided_crs": "EPSG:9999", "supported_crs": ["EPSG:4326", "EPSG:3857"] } } }

Changelog & Compatibility

v2.4.1 (Current):

For migration guides from v1.x, see the Upgrade Documentation.