Documentation
DocumentationAuthentication & scopes
DOCS / UWA V1 RELEASE CONTRACT SELF-HOSTED GATEWAY

Authentication & scopes

Client access is separate from upstream BYOK credentials and supports all eight product scopes.

ONE GATEWAYCoordinates → eligible provider → canonical responseWhy UWA
On this page 3 sections

#Send a gateway client key

curl -H "X-API-Key: YOUR_GATEWAY_KEY" \
  "http://127.0.0.1:8080/v1/weather?lat=21.21&lon=81.43"

The Authorization: Bearer header is also supported. Never pass client keys in URL query strings. Key-usage timestamp updates (LastUsedAt) are coalesced asynchronously in a bounded 2,048-entry queue so authentication lookups remain fast while preserving immediate revocation semantics.

#Scope mapping across all 10 routes

EndpointRequired scopeRelease profile
/v1/datasetsper requested datasetlean_v1
/v1/weatherweather:readlean_v1
/v1/forecastforecast:readlean_v1
/v1/forecast/dailyforecast:readlean_v1
/v1/geocodegeocode:readlean_v1
/v1/astronomyastronomy:readlean_v1
/v1/air-qualityair-quality:readfull_experimental
/v1/historyhistory:readfull_experimental
/v1/marinemarine:readfull_experimental
/v1/alertsalerts:readfull_experimental

#Provisioning scoped keys with uapctl

With APP_DATABASE_URL configured, the offline uapctl CLI supports provisioning client keys across all eight product scopes (weather:read, geocode:read, forecast:read, air-quality:read, history:read, astronomy:read, marine:read, alerts:read):

go run ./cmd/uapctl create-key --name prod-client \
  --scopes weather:read,geocode:read,forecast:read,astronomy:read \
  --expires-in 2160h

The tool writes the plaintext secret once to stdout and the key ID to stderr. Store the secret securely outside logs and repositories.

Canonical contracts: docs/openapi.yaml (lean_v1) and docs/openapi.experimental.yaml · Verify against your build before production use.

Search local documentation. No external requests.

↑↓ to move · Enter to openESC to close