v1

OGC API - Features

Mapalyze implementiert OGC API - Features (Teil 1 Core + Teil 4 Transactions).

Basis-URL

https://<ref>.supabase.co/functions/v1/api-gateway/oapif

Authentifizierung

Senden Sie den API-Schlüssel in X-API-Key:

curl -H "X-API-Key: mk_live_..." \
  "https://<ref>.supabase.co/functions/v1/api-gateway/oapif/collections"

Conformance

  • ogcapi-features-1/1.0/conf/core
  • ogcapi-features-1/1.0/conf/geojson
  • ogcapi-features-4/1.0/conf/create-replace-delete
  • ogcapi-features-4/1.0/conf/update

Endpoints

Entdeckung

Methode Pfad Beschreibung
GET /oapif/ Landing-Dokument
GET /oapif/conformance Conformance-Deklaration
GET /oapif/api OpenAPI-Definition

Collections (Formulare)

Methode Pfad Beschreibung
GET /oapif/collections Formular-Collections auflisten
GET /oapif/collections/{formId} Collection-Metadaten + Schema

Items (Datensätze)

Methode Pfad Scope Beschreibung
GET /oapif/collections/{formId}/items read Datensätze als GeoJSON FeatureCollection auflisten
GET /oapif/collections/{formId}/items/{recordId} read Einzelnes Feature
POST /oapif/collections/{formId}/items write Feature erstellen
PUT /oapif/collections/{formId}/items/{recordId} write Feature ersetzen
PATCH /oapif/collections/{formId}/items/{recordId} write Feature teilweise aktualisieren
DELETE /oapif/collections/{formId}/items/{recordId} write Feature soft-löschen

Abfrageparameter (GET items)

Parameter Typ Beschreibung
limit int Features pro Seite (Standard 100, max 10000)
offset int Offset für Paginierung
bbox string minLng,minLat,maxLng,maxLat
bbox-crs string Unterstützt: CRS84, urn:ogc:def:crs:OGC:1.3:CRS84 oder vollständige OGC CRS84 URL
datetime string ISO-8601 Zeitpunkt oder Intervall (2026-01-01T00:00:00Z/..)
project_id string Nach Projekt filtern
f string Ausgabeformat: json oder geojson

Ungültiges f oder nicht unterstütztes bbox-crs gibt 400 validation_error zurück.


Paginierung und Metadaten

Antworten enthalten deterministische Paginierungslinks und Zähler:

{
  "type": "FeatureCollection",
  "timeStamp": "2026-02-20T09:30:12.121Z",
  "numberMatched": 78,
  "numberReturned": 10,
  "features": [],
  "links": [
    {"href": "...?limit=10&offset=0", "rel": "self"},
    {"href": "...?limit=10&offset=10", "rel": "next"}
  ]
}

Das Gateway bewahrt relevante Abfrageparameter (bbox, datetime, project_id, f, bbox-crs) in generierten Links.


Ein Feature erstellen

curl -X POST \
  -H "X-API-Key: mk_live_..." \
  -H "Content-Type: application/json" \
  "https://<ref>.supabase.co/functions/v1/api-gateway/oapif/collections/{formId}/items" \
  -d '{
    "type": "Feature",
    "geometry": {"type": "Point", "coordinates": [-6.75, 37.57]},
    "properties": {
      "name": "New Point",
      "project_id": "c328e46a-8fb9-41f1-a5f9-3dca9a894ab3"
    }
  }'

Hinweise:

  • Die Geometrie muss gültiges GeoJSON sein.
  • Das Geometrie-Payload ist auf 100KB begrenzt.
  • Wenn properties.project_id angegeben wird, muss es zur selben Organisation gehören.
  • System-Properties (_mapalyze_*) in der Eingabe werden ignoriert.

CRS

Antworten enthalten:

Content-Crs: <http://www.opengis.net/def/crs/OGC/1.3/CRS84>

Alle Koordinaten sind CRS84 (WGS84 lon/lat).

Rate-Limits

OGC-Endpoints folgen den gleichen API-Schlüssel-Limits, die unter Fehler und Rate-Limits dokumentiert sind.

Brauchen Sie Hilfe mit der API? Kontaktieren Sie unser Support-Team.

Web-App öffnen