v1
QGIS Integration
Mapalyze supports two QGIS integration paths:
- OGC API - Features (recommended, read/write)
- Direct PostGIS (read-only analysis)
Option 1: OGC API - Features (recommended)
Use this for operational editing from QGIS (create/update/delete).
Requirements
- QGIS 3.40.4+
- API key with
read-writeoradminscope - OGC endpoint URL:
https://<ref>.supabase.co/functions/v1/api-gateway/oapif
Authentication config in QGIS
- QGIS -> Settings > Options > Authentication
- Add new config:
- Type:
API Header - Header:
X-API-Key - Value:
mk_live_...(ormk_test_...in sandbox)
- Type:
Add OGC connection
- Layer > Add Layer > Add WFS / OGC API - Features Layer
- Create connection:
- URL:
https://<ref>.supabase.co/functions/v1/api-gateway/oapif - Authentication: select config above
- Enable paging: enabled
- URL:
- Connect and add layers.
Useful query params
| Parameter | Example | Description |
|---|---|---|
limit |
200 |
Features per page |
offset |
0 |
Offset paging |
bbox |
-7,37,-6,38 |
Spatial filter |
datetime |
2026-01-01T00:00:00Z/.. |
Updated-at filter |
project_id |
uuid |
Project filter |
f |
geojson |
Output format (json or geojson) |
Option 2: Direct PostGIS (read-only)
Use this for advanced spatial SQL in PostGIS.
Requirements
- QGIS 3.x
- Direct DB connection credentials
- Live API key (
mk_live_...) with read-capable scope (read-only,read-write, oradmin)
Session setup (required)
After connecting, run:
SELECT qgis.setup_session('mk_live_your_key_here');
This validates the key and scopes data to your organization.
Important:
qgis.setup_sessionrequires live keys.- Test keys (
mk_test_...) are rejected for production QGIS session setup.
Available views (qgis schema)
| Layer | Description |
|---|---|
qgis.records |
Spatial records |
qgis.records_all |
All records (including non-spatial) |
qgis.forms |
Form metadata |
qgis.projects |
Project metadata |
Troubleshooting
Empty layers / no features
- Confirm records actually have geometry.
- Confirm form has a published version.
- Confirm key has read scope and belongs to the correct org.
Permission denied on edits (OGC)
- Use
read-writeoradminkey.
QGIS access requires a live API key
- Use a
mk_live_...key forqgis.setup_session(...).
Invalid OGC URL
- URL must end with
/oapif.
Precisa de ajuda com a API? Entre em contato com nossa equipe de suporte.