API Endpoints¶
This page lists the most relevant application endpoints used by UI workflows.
Map APIs¶
| Endpoint | Method | Auth | Purpose |
|---|---|---|---|
/parcels/api/geojson/ |
GET | login | Map data (grid summaries or parcel features, supports ref_ts) |
/parcels/api/extent/ |
GET | login | Bounding extent of visible parcels (supports ref_ts) |
/parcels/api/geojson/<uuid:pk>/ |
GET | login | Single parcel version-row GeoJSON detail |
/parcels/api/select/ |
POST | login | Shape + predicate based selection |
/parcels/api/inline-update/<uuid:pk>/ |
POST | staff | Inline map edit that creates a new parcel version |
/api/rasters/ |
GET | login | Active/ready DEM and landcover overlay catalog for map settings |
/api/rasters/sample/ |
GET | login | Raster point sample at lat/lng for selected slug values (samples[] response) |
/raster-tiles/<path> |
GET | login | Raster tile endpoint backed by persistent RASTER_TILES_ROOT |
List/Search/Selection APIs¶
| Endpoint | Method | Auth | Purpose |
|---|---|---|---|
/parcels/search/ajax/ |
GET | login | Autocomplete search |
/parcels/api/filtered-ids/ |
GET | login | IDs of full filtered result set |
/parcels/batch/ |
POST | login | Batch export/delete/group edit (effective_at supported for write actions) |
Dataset Selector APIs¶
| Endpoint | Method | Auth | Purpose |
|---|---|---|---|
/auth/profile/set-active-dataset/ |
POST | login | Validate + set user active dataset, then redirect to safe next/referrer |
/auth/api/datasets/accessible/ |
GET | login | List active datasets accessible to current user with effective role |
/api/datasets/accessible/ |
GET | login | Root alias of accessible-datasets API for UI integrations |
Upload and Analytics APIs¶
| Endpoint | Method | Auth | Purpose |
|---|---|---|---|
/parcels/upload/ |
GET/POST | login | Upload/analyze vector data |
/parcels/upload/<uuid:pk>/preview/ |
GET/POST | login | Preview + apply upload decision |
/parcels/api/statistics/ |
POST | internal/staff | Statistics data for ECharts dashboard |
Export/Download Endpoints¶
| Endpoint | Method | Auth | Purpose |
|---|---|---|---|
/parcels/download/ |
GET | login | Download visible parcels in GIS formats |
/parcels/export/?format=csv|geojson |
GET | internal/staff | Legacy export helpers |
Permissions Notes¶
- All listed APIs require authentication unless explicitly public.
- Non-staff visibility generally resolves to: own parcels + public parcels.
- Active dataset filters are applied at the queryset layer for parcel APIs.
- Dataset selector options are server-derived; client-side filtering is convenience only.
- Read APIs default to active rows (
valid_to IS NULL,record_status = active) unless explicit historical query params are used. ref_tshistorical reads apply validity-window filters and excludevoidrows.
URL Semantics for Detail Routes¶
/parcels/<uuid:pk>/resolves a specific immutable version row./parcels/id/<parcel_id>/resolves the current active row for that parcel ID.