OGC API & Standards Endpoints
GeoLens implements several OGC and STAC standards alongside its REST API. This page covers the standards-based endpoints. Reach for the auto-generated reference for per-route schemas, request/response bodies, and the full conformance-class list.
Replace https://geolens.example.com with your GeoLens instance’s URL in every
example below. Authentication follows the same rules as the rest of the API —
see API Authentication for X-Api-Key, JWT, and OAuth
options.
OGC API — Common
Section titled “OGC API — Common”Provides the OGC API root, conformance declaration, and OpenAPI definition. Every OGC API client begins here.
Endpoints:
GET /api/— landing document with links to conformance, collections, and OpenAPI.GET /api/conformance— list of conformance class URIs (Records, Features, CQL2, etc.).GET /api/openapi.json— full OpenAPI definition.
Curl:
curl https://geolens.example.com/api/curl https://geolens.example.com/api/conformanceFor the full schema of every endpoint, see the Endpoints by Tag section in the auto-generated reference.
OGC API — Records
Section titled “OGC API — Records”The catalog itself is exposed as an OGC API Records collection at
collections/datasets. Use this to list, filter, and discover datasets
programmatically.
Endpoints:
GET /api/collections/datasets/items— list catalog records (paginated, CQL2-filterable).
Curl:
curl https://geolens.example.com/api/collections/datasets/itemsCQL2 filter (one example):
curl 'https://geolens.example.com/api/collections/datasets/items?filter=keywords%3D%27hydrology%27&filter-lang=cql2-text'The full CQL2 grammar is advertised in /api/conformance (look for the
cql2-text and features-filter conformance classes).
QGIS — MetaSearch (built-in plugin):
1. Web ▸ MetaSearch ▸ MetaSearch (built-in, no install)2. Services tab ▸ New3. Name: GeoLens URL: https://geolens.example.com/api/ Catalog Type: OGC API - Records4. Save → Search tab to query records.GDAL — ogr2ogr / ogrinfo (OAPIF driver):
ogrinfo OAPIF:https://geolens.example.com/api/OGC API — Features
Section titled “OGC API — Features”Per-dataset feature access for vector layers. Useful for exporting subsets to GeoPackage, Shapefile, or any GDAL-supported format.
Endpoints:
GET /api/collections/{dataset_id}/items— feature items for a single dataset (bbox, datetime, and CQL2 filterable).
Curl:
curl https://geolens.example.com/api/collections/{dataset_id}/itemsQGIS — Add Layer ▸ OGC API Features:
1. Layer ▸ Add Layer ▸ Add WFS / OGC API Features Layer…2. New connection: Name: GeoLens URL: https://geolens.example.com/api/?api_key=glk_live_...3. Connect → pick collection → Add.GDAL — export to GeoPackage:
ogr2ogr -f GPKG out.gpkg \ "OAPIF:https://geolens.example.com/api/?api_key=glk_live_..." \ {dataset_id}The ?api_key= query parameter is the recommended way to authenticate
ogr2ogr — the OAPIF driver does not currently let you set HTTP headers.
STAC 1.1
Section titled “STAC 1.1”GeoLens exposes raster collections (and their items) under a STAC 1.1 catalog
rooted at /api/stac/. Use any STAC client to search and ingest assets.
Endpoints:
GET /api/stac/— STAC root catalog.GET /api/stac/collections— list of STAC collections.POST /api/stac/search— full STAC search (bbox, datetime, collections, intersects, query).
Curl:
curl https://geolens.example.com/api/stac/pystac-client:
from pystac_client import Client
client = Client.open("https://geolens.example.com/api/stac/")search = client.search( collections=["my-raster-collection"], bbox=[-122.5, 37.5, -122.0, 38.0], datetime="2024-01-01/2024-12-31",)for item in search.items(): print(item.id, item.assets["data"].href)Tile Endpoints
Section titled “Tile Endpoints”GeoLens serves vector and raster tiles via signed access tokens. Tile tokens are not generic API keys — they are HMAC-signed, scoped to a single dataset, and time-limited. They exist so that embedded maps can serve tiles without exposing a permanent credential to the browser.
Vector tile (MVT) URL shape:
https://geolens.example.com/api/tiles/{dataset_id}/{z}/{x}/{y}.pbf?token={hmac_signed_token}Raster tile (Titiler-based) URL shape:
Titiler-rendered raster tiles follow Titiler’s standard /tiles/... URL
pattern under /api/. Confirm the exact path in your instance’s
auto-generated reference under the Tiles tag.
Obtaining a tile token. Tile tokens are issued by an authenticated request against:
POST /api/tiles/tokens/— mint a new token for a dataset.GET /api/tiles/token/{dataset_id}/— fetch an existing token.
These endpoints accept the same authentication as the rest of the API
(X-Api-Key, JWT, OAuth-issued JWT). Tile tokens themselves are not
substitutes for those credentials — they are derived, scoped, and expire.
QGIS — Add XYZ Tiles:
1. Browser panel ▸ XYZ Tiles ▸ Right-click → New Connection…2. Name: GeoLens — <dataset> URL: https://geolens.example.com/api/tiles/{dataset_id}/{z}/{x}/{y}.pbf?token=<token>3. OK → drag the connection onto the canvas.Replace <token> with a value obtained from POST /api/tiles/tokens/.
Tokens issued in QGIS workflows should be treated as session credentials —
mint a fresh one when the previous one expires.