OGC Endpoints
Sanson implements OGC API — Features at the root URL. These endpoints are compatible with QGIS, ArcGIS, FME, and any OGC-compliant client.
Landing page
GET /Returns the API entry point with links to conformance, collections, and the OpenAPI spec.
{
"title": "Sanson",
"description": "An open source geospatial server — OGC API Features compliant",
"links": [
{ "href": "/", "rel": "self", "type": "application/json" },
{ "href": "/conformance", "rel": "conformance", "type": "application/json" },
{ "href": "/collections", "rel": "data", "type": "application/json" },
{
"href": "/api",
"rel": "service-desc",
"type": "application/vnd.oai.openapi+json;version=3.0"
}
]
}Conformance
GET /conformanceDeclares the OGC conformance classes supported by Sanson:
| Conformance class | Status |
|---|---|
| Core | Implemented |
| GeoJSON | Implemented |
| OAS30 | Implemented |
| Filter | Implemented |
| Features Filter | Implemented |
| Queryables | Implemented |
| CQL2 Text | Implemented |
| CQL2 Basic | Implemented |
| CQL2 Basic Spatial | Implemented |
| CQL2 Spatial Functions | Implemented |
| CQL2 Advanced Comparison | Implemented |
| Tiles Core | Implemented |
| Tileset | Implemented |
| Tile Matrix Set | Implemented |
| CQL2 JSON | Implemented |
| CQL2 Temporal | Implemented |
| CRS by Reference | Implemented |
OpenAPI specification
GET /apiReturns the auto-generated OpenAPI 3.0 specification. The admin UI includes an interactive API explorer powered by Scalar for testing endpoints directly from the browser.
Collections
GET /collectionsLists all available feature collections across all workspaces.
GET /collections/{collectionId}Returns metadata for a single collection.
Collection ID format: {workspaceName}:{collectionName} (e.g., default:regions).
TIP
The : separator follows the same convention used by GeoServer. If your proxy or WAF has issues with : in URLs, clients can encode it as %3A.
Response example
{
"id": "default:regions",
"title": "regions",
"extent": {
"spatial": { "bbox": [[-5.1, 41.3, 9.6, 51.1]] }
},
"itemType": "feature",
"crs": ["http://www.opengis.net/def/crs/OGC/1.3/CRS84"],
"links": [
{ "href": "/collections/default:regions", "rel": "self", "type": "application/json" },
{
"href": "/collections/default:regions/items",
"rel": "items",
"type": "application/geo+json"
},
{
"href": "/collections/default:regions/queryables",
"rel": "queryables",
"type": "application/schema+json"
}
]
}Features
GET /collections/{collectionId}/itemsReturns features as a GeoJSON FeatureCollection with pagination.
Query parameters
| Parameter | Description | Example |
|---|---|---|
limit | Number of features per page (default: 25, max: 100) | ?limit=50 |
offset | Pagination offset (default: 0) | ?offset=100 |
bbox | Bounding box filter | ?bbox=2.2,48.8,2.5,49.0 |
datetime | Temporal filter (requires configured datetime_column) | ?datetime=2024-01-01/2024-12-31 |
lat + lon | Point intersection filter | ?lat=48.85&lon=2.35 |
lat + lon + radius | Radius search in meters | ?lat=48.85&lon=2.35&radius=1000 |
filter | CQL2 Text or JSON expression | ?filter=population>100000 |
filter-lang | Filter language (cql2-text or cql2-json) | ?filter-lang=cql2-text |
crs | Output CRS URI (default: CRS84) | ?crs=http://...EPSG/0/3857 |
bbox-crs | CRS of bbox values (default: CRS84) | ?bbox-crs=http://...EPSG/0/3857 |
See CQL2 Filtering and Spatial Filtering for details.
Coordinate Reference Systems
By default, coordinates are returned in WGS84 (CRS84, longitude/latitude). Use the crs parameter to request coordinates in a different CRS:
GET /collections/default:communes/items?crs=http://www.opengis.net/def/crs/EPSG/0/2154The response includes a Content-Crs header indicating the CRS used:
Content-Crs: <http://www.opengis.net/def/crs/EPSG/0/2154>Supported CRS per collection are listed in the collection metadata (crs array). Common CRS include:
http://www.opengis.net/def/crs/OGC/1.3/CRS84(default, WGS84 lon/lat)http://www.opengis.net/def/crs/EPSG/0/4326(WGS84)http://www.opengis.net/def/crs/EPSG/0/3857(Web Mercator)http://www.opengis.net/def/crs/EPSG/0/2154(Lambert 93, France)
The bbox-crs parameter specifies the CRS of bbox values when they are not in WGS84.
Pagination
The response includes pagination links in both the JSON body and HTTP headers:
{
"type": "FeatureCollection",
"features": [],
"numberMatched": 142,
"numberReturned": 25,
"links": [
{ "href": "/collections/default:regions/items?offset=0&limit=25", "rel": "self" },
{ "href": "/collections/default:regions/items?offset=25&limit=25", "rel": "next" },
{ "href": "/collections/default:regions/items?offset=0&limit=25", "rel": "first" },
{ "href": "/collections/default:regions/items?offset=125&limit=25", "rel": "last" }
]
}HTTP headers:
X-Total-Count: 142
Link: </collections/default:regions/items?offset=25&limit=25>; rel="next", ...All query parameters (bbox, datetime, filter, etc.) are preserved in pagination links.
Feature by ID
GET /collections/{collectionId}/items/{featureId}Returns a single GeoJSON Feature by its identifier.
Queryables
GET /collections/{collectionId}/queryablesReturns a JSON Schema describing the filterable properties of the collection. This enables GIS clients like QGIS to dynamically build filter UIs without prior knowledge of the data schema.
TIP
If exposed fields are configured on the collection, only those columns appear in queryables, features, and vector tiles. Aliases are reflected in property names.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/collections/default:regions/queryables",
"type": "object",
"title": "regions",
"properties": {
"geom": { "$ref": "https://geojson.org/schema/Geometry.json" },
"nom": { "title": "nom", "type": "string" },
"code": { "title": "code", "type": "string" }
}
}Style
GET /collections/{collectionId}/styleReturns the style configuration for a collection (see Collection Style for the format). Returns 204 No Content if no style is configured. External clients can use this endpoint to apply consistent styling.
Health check
GET /healthReturns the database connectivity status. Useful for load balancer health probes.
