API Overview

The GeoServer REST API provides programmatic access to geospatial data management, map rendering, and spatial analysis capabilities. All requests are made over HTTPS and return data in JSON format unless specified otherwise.

Base URL
https://api.geoserver.io/v1

All endpoints require authentication via API Key or OAuth2 Bearer token. See the Authentication section for setup instructions.

Authentication

Access the API by including your API key in the Authorization header. Keys can be generated from the Developer Console.

Header Format

curl -X GET https://api.geoserver.io/v1/layers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Security Best Practices

Never expose API keys in client-side code. Use environment variables for server-side requests, and implement token rotation for long-running processes.

Rate Limiting

API requests are limited to ensure fair usage and system stability. Limits vary by subscription tier:

PlanRequests / MinuteBurst Limit
Starter6010
Professional50050
EnterpriseUnlimitedCustom

When rate limited, the API returns a 429 Too Many Requests status with X-RateLimit-Reset header indicating when the window resets.

Layers

Manage geospatial vector and raster layers. Layers define the data sources, styling rules, and rendering parameters for your maps.

GET /layers

Retrieve a paginated list of all available layers in your account.

Query Parameters

ParameterTypeDescription
limitintegerNumber of results (default: 25, max: 100)
offsetintegerPagination offset
workspacestringFilter by workspace name
POST /layers

Create a new geospatial layer from GeoJSON, Shapefile, or WMS source.

Request Body

{
  "name": "urban_green_space",
  "workspace": "environment",
  "type": "vector",
  "source": {
    "type": "geojson_url",
    "url": "https://data.example.org/parks.geojson"
  },
  "style": {
    "color": "#4CAF50",
    "stroke": "#2E7D32",
    "min_zoom": 10
  }
}

Response (201 Created)

{
  "id": "lyr_8f3k29x1",
  "name": "urban_green_space",
  "status": "processing",
  "created_at": "2025-04-12T08:30:00Z",
  "bounds": { "min_lon": -122.5, "min_lat": 37.7, "max_lon": -122.3, "max_lat": 37.9 }
}

Maps & Workspaces

GET /maps/{map_id}/metadata

Fetch map configuration, layer order, and projection settings.

POST /maps

Create a new map composition by combining multiple layers with custom styling and extent.

Tile Generation

GET /tiles/{layer}/{z}/{x}/{y}.png

Request pre-rendered map tiles in XYZ tiling scheme. Supports PNG, JPEG, and WebP formats. Tiles are cached at edge locations for low-latency delivery.

ParameterTypeDescription
layerstringLayer ID or name
zintegerZoom level (0-18)
xintegerTile X coordinate
yintegerTile Y coordinate

Spatial Analysis

POST /analyze/buffer

Perform geometric operations and spatial queries. Accepts GeoJSON FeatureCollections and returns transformed geometries.

Request Body

{
  "input": {
    "type": "Feature",
    "geometry": { "type": "Point", "coordinates": [-122.4194, 37.7749] },
    "properties": {}
  },
  "operation": "buffer",
  "parameters": { "radius_meters": 500, "segments": 32 }
}

Error Handling

The API uses standard HTTP status codes. Error responses include a JSON body with machine-readable codes and human-readable messages.

CodeMeaningCommon Cause
400Bad RequestMalformed JSON, invalid parameters, or missing required fields
401UnauthorizedMissing or invalid API key/token
403ForbiddenInsufficient permissions for the requested resource
404Not FoundLayer, map, or resource does not exist
429Rate LimitedExceeded request quota for your plan
500Server ErrorInternal processing failure (contact support)

Error Response Format

{
  "error": {
    "code": "INVALID_GEOJSON",
    "message": "FeatureCollection must contain valid coordinates array.",
    "details": {
      "field": "geometry.coordinates",
      "expected": "Array of numbers",
      "received": "null"
    }
  }
}

Client SDKs

Official libraries are available for popular languages to simplify authentication, request signing, and response parsing.

LanguagePackageInstallation
Pythongeoserver-pythonpip install geoserver-python
JavaScript/Node@geoserver/jsnpm install @geoserver/js
Gogithub.com/geoserver/go-sdkgo get github.com/geoserver/go-sdk