REST API Reference
Integrate GeoServer's geospatial infrastructure directly into your applications. Access map layers, execute spatial queries, and manage geospatial data stores programmatically.
https://api.geoserver.com/v1
Authentication
All API requests require authentication using a Bearer token passed in the Authorization header. Tokens can be generated from your dashboard under Settings → API Keys.
Authorization: Bearer your_api_key_here
401 Unauthorized: Missing or invalid token
403 Forbidden: Token lacks required scope
Layers
Manage map layers, styling, and visibility settings.
GET
/layers
List all available map layers
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspace | string | No | Filter by workspace name |
| type | string | No | Filter by layer type: vector, raster, wms |
| limit | integer | No | Max results (default: 20, max: 100) |
{
"data": [
{
"id": "lyr_8x92k",
"name": "global_temperature_2024",
"type": "raster",
"workspace": "climate",
"crs": "EPSG:4326",
"visible": true
}
],
"meta": {
"page": 1,
"total": 142
}
}
POST
/layers
Create a new map layer
{
"name": "urban_flooding_zones",
"type": "vector",
"workspace": "disaster_mgmt",
"source": {
"type": "geojson",
"url": "https://storage.example.com/shapefiles/urban.geojson"
},
"crs": "EPSG:4326"
}
{
"id": "lyr_9x12m",
"status": "processing",
"message": "Layer created. Indexing in progress."
}
Spatial Queries
Execute geographic searches, buffer operations, and spatial joins.
POST
/spatial-queries
Execute spatial query
{
"geometry": {
"type": "Polygon",
"coordinates": [[[-122.4, 37.7], [-122.3, 37.7], [-122.3, 37.8], [-122.4, 37.8], [-122.4, 37.7]]]
},
"relation": "intersects",
"layer_id": "lyr_8x92k",
"buffer_distance": 500
}
{
"features": 24,
"results": [
{
"id": "feat_01",
"properties": { "name": "San Francisco", "temp_avg": 14.2 },
"geometry": { "type": "Point", "coordinates": [-122.4194, 37.7749] }
}
]
}
Rate Limits
API requests are throttled to ensure service stability. Limits are applied per API key:
| Plan | Requests/min | Burst limit | Concurrent queries |
|---|---|---|---|
| Starter | 60 | 10 | 1 |
| Professional | 500 | 50 | 5 |
| Enterprise | Unlimited | 200 | 20 |
Rate limit headers are included in every response:
X-RateLimit-Limit: 500
X-RateLimit-Remaining: 482
X-RateLimit-Reset: 1692412800
Pagination
Collection endpoints support cursor-based pagination. Use the cursor parameter from the previous response to fetch the next page.
GET /layers?limit=20&cursor=eyJpZCI6MTAwMH0=