v2.0.4

REST API Documentation

Interact with GeoServer's geospatial infrastructure programmatically. The API follows RESTful conventions, uses standard HTTP methods, and returns JSON responses.

Base URL: https://api.geoserver.com/v2

All requests must include a valid API key. Responses use standard HTTP status codes and JSON format. The API supports CORS for cross-origin requests from your applications.

Authentication

Authenticate your requests by including your API key in the Authorization header. Keys can be generated in your dashboard under Settings > API Keys.

curl
curl -X GET "https://api.geoserver.com/v2/layers" \
  -H "Authorization: Bearer gsv_live_8xK9mPqL2vN4wR7yT1"

Never expose your secret keys in client-side code. Use environment variables or a secure proxy for frontend applications.

Rate Limits

API requests are limited to ensure fair usage. Limits are applied per API key.

Plan Requests / minute Requests / day
Starter6010,000
Professional300100,000
EnterpriseUnlimited*Unlimited*

*Subject to fair use policy and infrastructure capacity.

Rate limit headers are included in every response:

  • X-RateLimit-Limit — Maximum requests allowed
  • X-RateLimit-Remaining — Requests left in window
  • X-RateLimit-Reset — Unix timestamp when limit resets

Endpoints

Layers

Manage vector and raster map layers.

Method Endpoint Description
GET /layers List all available layers
GET /layers/{id} Get layer metadata & style config
POST /layers Create a new layer from GeoJSON/Shapefile
PUT /layers/{id}/style Update SLD/SLSS styling rules
DELETE /layers/{id} Permanently remove layer

Features

Query and manipulate geospatial features.

Method Endpoint Description
GET /features Search features by spatial bounds
GET /features/{id}/bounds Get bounding box for a feature
POST /features/bulk Insert multiple features at once

Request Parameters

Parameter Type Description
layer_id string Target layer identifier required
bbox string Comma-separated coordinates: minLon,minLat,maxLon,maxLat
properties object Key-value filter for attributes
crs string Output coordinate reference system (default: EPSG:4326)

Example Response

JSON (200 OK)
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "feat_9a8b7c6d",
      "geometry": {
        "type": "Point",
        "coordinates": [-122.4194, 37.7749]
      },
      "properties": {
        "name": "SF Monitoring Node",
        "status": "active",
        "last_updated": "2025-01-14T08:30:00Z"
      }
    }
  ],
  "pagination": {
    "total": 148,
    "page": 1,
    "per_page": 20
  }
}

Pagination

All list endpoints are paginated. Use query parameters to navigate:

  • ?page=1 — Page number (default: 1)
  • ?per_page=50 — Items per page (max: 100)
  • ?cursor=eyJpZCI6MTIzfQ — Opaque cursor for forward pagination

Filtering & Sorting

Apply dynamic filters using standard query syntax:

Example Query
GET /features?layer_id=rivers&status=active&sort=-created_at&fields=name,bbox

Prefix a sort field with - for descending order. Use fields to reduce payload size.

Error Codes

GeoServer uses conventional HTTP status codes. Error responses include a machine-readable error_code for debugging.

400 Bad Request
Invalid parameters, malformed JSON, or missing required fields.
401 Unauthorized
Missing or invalid API key. Check token expiration.
403 Forbidden
Insufficient permissions for the requested resource.
404 Not Found
Resource does not exist or has been deleted.
429 Too Many Requests
Rate limit exceeded. Retry after X-RateLimit-Reset.
500 Internal Server
Unexpected platform error. Contact support with request ID.

SDKs & Tools

Speed up development with official client libraries and integrations:

  • JavaScript/TypeScript@geoserver/sdk-js
  • Pythonpip install geoserver-client
  • Postman Collection — Import & test endpoints instantly
  • QGIS Plugin — Direct layer sync & version control

Full source code and contribution guidelines are available on GitHub.