API documentation
Read-only HTTP API for external integrations: Power BI, Excel, custom scripts, and future IFC pipelines.
/zones/*returns a rich flat zone table./systems/*returns a flat system table, including the zones each system is linked to./components/*returns a flat component table, including the systems each component is linked to./dimensions/*returns dimension tables for BI joins.
Base URL: https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api(override with VITE_EXTERNAL_API_BASE_URL)
Treat API keys like passwords
- The raw key is shown only once, at creation.
- Do not paste keys into public documents, GitHub, screenshots or shared dashboards.
- For Power BI publishing, store the key in data source credentials, not in the query text.
- If a key leaks, revoke it on the API keys page and issue a new one.
Authentication
Data endpoints require your personal API key in the Authorization header. This is not a Supabase JWT — it is the user-generated key created on the API keys page. /status is the only endpoint that does not require an API key.
Authorization: Bearer tindx_live_xxxxxxxxxxxxxxxxcurl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/customer?customer_id=<uuid>"Key scopes
A key may be restricted to a single customer, portfolio, property, building, or project. The backend rejects requests that target data outside the key's scope.
- customer — all records under the customer
- portfolio — all records under the portfolio
- property — all records under the property
- building — all records inside the building
- project — supported for
/zones/projectonly
Note: /systems/* and /components/* support customer, portfolio, property and building scopes. They do not support project scope.
Status codes
| 200 | OK |
| 400 | Missing parameter / wrong method |
| 401 | Missing or invalid API key |
| 403 | Revoked or expired API key |
| 404 | Unknown route |
| 500 | Server / database error |
Deployment (admin / developer note)
The external API is implemented as a Supabase Edge Function named external-api. Deploy with JWT verification disabled — authentication is handled inside the function via the user API key:
supabase functions deploy external-api --no-verify-jwtThe Supabase service role key must be configured as a Supabase secret only:
supabase secrets set SUPABASE_SERVICE_ROLE_KEY=<service_role_key>
supabase secrets set SUPABASE_URL=https://fgeutaynbzlbdoulzvmh.supabase.coNever expose the service role key in frontend env vars, Lovable config, GitHub, or browser code. It bypasses RLS.
API explorer
Tip: test connectivity first with GET /status — it requires no API key and should return { "status": "ok" }.
Try it out
Send a real request against the API. Start with GET /status — it requires no API key. For data endpoints, paste your full API key below. Saved keys only expose their prefix; the raw key is shown only once at creation and must be pasted manually here.
GET https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/statusStatus
/statusUnauthenticated health check. Try this first.
curl "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/status"{
"status": "ok",
"time": "2026-06-01T00:00:00Z"
}Zones
/zones/customerAll active zones under a customer, resolved via properties.customer_id. Returns the full flat zone row with customer, portfolio, property, building, floor, drawing, zone type, project and calibration metadata.
| Name | Type | Required | Description |
|---|---|---|---|
| customer_id | uuid | yes | Target customer. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/customer?customer_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"floor_id": "…",
"floor_name": "Etasje 01",
"floor_code": "01",
"floor_number": 1,
"drawing_id": "…",
"drawing_name": "Plan 01",
"drawing_file_name": "plan_01.pdf",
"drawing_file_path": "property/building/floor/drawing/original.pdf",
"drawing_revision": "A",
"drawing_date": "2026-06-01",
"drawing_page_number": 1,
"pdf_view": null,
"pdf_rotate": 0,
"pdf_user_unit": 1,
"zone_id": "…",
"zone_name": "Tenant Area A",
"zone_code": "TA-A",
"area_m2": 123.45,
"perimeter_m": 58.2,
"geometry": {
"schema_version": 1,
"type": "Polygon",
"coordinate_system": "pdf_page",
"points": []
},
"properties": {
"comment_1": "Example comment"
},
"external_ref": null,
"source_system": null,
"version": 1,
"status": "active",
"ifc_guid": null,
"created_by": "…",
"updated_by": null,
"created_at": "2026-06-01T00:00:00Z",
"updated_at": "2026-06-01T00:00:00Z",
"zone_type_id": "…",
"zone_type_key": "tenant_area",
"zone_type_name": "Leietakerareal",
"zone_type_category": "area",
"zone_type_color": "#3b82f6",
"zone_type_description": "Areal knyttet til leietaker",
"is_area_zone": true,
"is_ifc_exportable": true,
"ifc_class": "IfcSpace",
"ifc_object_type": "TenantArea",
"project_id": "…",
"project_name": "Energy Mapping 2026",
"project_number": "P-2026-001",
"project_description": "Kartlegging",
"project_contact_person": "Ola Nordmann",
"project_contact_email": "ola@example.com",
"project_zone_role": "included",
"project_zone_area_m2": 123.45,
"project_zone_properties": {},
"calibration_id": "…",
"calibration_method": "area",
"calibration_point_a": null,
"calibration_point_b": null,
"calibration_real_distance_m": null,
"meters_per_pdf_unit": 0.025,
"average_meters_per_pdf_unit": 0.025,
"average_pdf_units_per_meter": 40,
"calibration_source_rooms": [
{
"id": "room-1",
"name": "Rom 1",
"points": [],
"measuredAreaPdf2": 29440,
"realAreaM2": 18.4,
"metersPerPdfUnit": 0.025,
"pdfUnitsPerMeter": 40,
"deviationPercent": 1.8
}
],
"calibration_confidence": "high",
"calibration_max_deviation_percent": 2.4
}
]
}/zones/portfolioAll active zones under a portfolio. Same rich flat row as /zones/customer.
| Name | Type | Required | Description |
|---|---|---|---|
| portfolio_id | uuid | yes | Target portfolio. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/portfolio?portfolio_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"floor_id": "…",
"floor_name": "Etasje 01",
"floor_code": "01",
"floor_number": 1,
"drawing_id": "…",
"drawing_name": "Plan 01",
"drawing_file_name": "plan_01.pdf",
"drawing_file_path": "property/building/floor/drawing/original.pdf",
"drawing_revision": "A",
"drawing_date": "2026-06-01",
"drawing_page_number": 1,
"pdf_view": null,
"pdf_rotate": 0,
"pdf_user_unit": 1,
"zone_id": "…",
"zone_name": "Tenant Area A",
"zone_code": "TA-A",
"area_m2": 123.45,
"perimeter_m": 58.2,
"geometry": {
"schema_version": 1,
"type": "Polygon",
"coordinate_system": "pdf_page",
"points": []
},
"properties": {
"comment_1": "Example comment"
},
"external_ref": null,
"source_system": null,
"version": 1,
"status": "active",
"ifc_guid": null,
"created_by": "…",
"updated_by": null,
"created_at": "2026-06-01T00:00:00Z",
"updated_at": "2026-06-01T00:00:00Z",
"zone_type_id": "…",
"zone_type_key": "tenant_area",
"zone_type_name": "Leietakerareal",
"zone_type_category": "area",
"zone_type_color": "#3b82f6",
"zone_type_description": "Areal knyttet til leietaker",
"is_area_zone": true,
"is_ifc_exportable": true,
"ifc_class": "IfcSpace",
"ifc_object_type": "TenantArea",
"project_id": "…",
"project_name": "Energy Mapping 2026",
"project_number": "P-2026-001",
"project_description": "Kartlegging",
"project_contact_person": "Ola Nordmann",
"project_contact_email": "ola@example.com",
"project_zone_role": "included",
"project_zone_area_m2": 123.45,
"project_zone_properties": {},
"calibration_id": "…",
"calibration_method": "area",
"calibration_point_a": null,
"calibration_point_b": null,
"calibration_real_distance_m": null,
"meters_per_pdf_unit": 0.025,
"average_meters_per_pdf_unit": 0.025,
"average_pdf_units_per_meter": 40,
"calibration_source_rooms": [
{
"id": "room-1",
"name": "Rom 1",
"points": [],
"measuredAreaPdf2": 29440,
"realAreaM2": 18.4,
"metersPerPdfUnit": 0.025,
"pdfUnitsPerMeter": 40,
"deviationPercent": 1.8
}
],
"calibration_confidence": "high",
"calibration_max_deviation_percent": 2.4
}
]
}/zones/propertyAll active zones under a property (all buildings & floors).
| Name | Type | Required | Description |
|---|---|---|---|
| property_id | uuid | yes | Target property. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/property?property_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"floor_id": "…",
"floor_name": "Etasje 01",
"floor_code": "01",
"floor_number": 1,
"drawing_id": "…",
"drawing_name": "Plan 01",
"drawing_file_name": "plan_01.pdf",
"drawing_file_path": "property/building/floor/drawing/original.pdf",
"drawing_revision": "A",
"drawing_date": "2026-06-01",
"drawing_page_number": 1,
"pdf_view": null,
"pdf_rotate": 0,
"pdf_user_unit": 1,
"zone_id": "…",
"zone_name": "Tenant Area A",
"zone_code": "TA-A",
"area_m2": 123.45,
"perimeter_m": 58.2,
"geometry": {
"schema_version": 1,
"type": "Polygon",
"coordinate_system": "pdf_page",
"points": []
},
"properties": {
"comment_1": "Example comment"
},
"external_ref": null,
"source_system": null,
"version": 1,
"status": "active",
"ifc_guid": null,
"created_by": "…",
"updated_by": null,
"created_at": "2026-06-01T00:00:00Z",
"updated_at": "2026-06-01T00:00:00Z",
"zone_type_id": "…",
"zone_type_key": "tenant_area",
"zone_type_name": "Leietakerareal",
"zone_type_category": "area",
"zone_type_color": "#3b82f6",
"zone_type_description": "Areal knyttet til leietaker",
"is_area_zone": true,
"is_ifc_exportable": true,
"ifc_class": "IfcSpace",
"ifc_object_type": "TenantArea",
"project_id": "…",
"project_name": "Energy Mapping 2026",
"project_number": "P-2026-001",
"project_description": "Kartlegging",
"project_contact_person": "Ola Nordmann",
"project_contact_email": "ola@example.com",
"project_zone_role": "included",
"project_zone_area_m2": 123.45,
"project_zone_properties": {},
"calibration_id": "…",
"calibration_method": "area",
"calibration_point_a": null,
"calibration_point_b": null,
"calibration_real_distance_m": null,
"meters_per_pdf_unit": 0.025,
"average_meters_per_pdf_unit": 0.025,
"average_pdf_units_per_meter": 40,
"calibration_source_rooms": [
{
"id": "room-1",
"name": "Rom 1",
"points": [],
"measuredAreaPdf2": 29440,
"realAreaM2": 18.4,
"metersPerPdfUnit": 0.025,
"pdfUnitsPerMeter": 40,
"deviationPercent": 1.8
}
],
"calibration_confidence": "high",
"calibration_max_deviation_percent": 2.4
}
]
}/zones/buildingAll active zones inside a building.
| Name | Type | Required | Description |
|---|---|---|---|
| building_id | uuid | yes | Target building. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/building?building_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"floor_id": "…",
"floor_name": "Etasje 01",
"floor_code": "01",
"floor_number": 1,
"drawing_id": "…",
"drawing_name": "Plan 01",
"drawing_file_name": "plan_01.pdf",
"drawing_file_path": "property/building/floor/drawing/original.pdf",
"drawing_revision": "A",
"drawing_date": "2026-06-01",
"drawing_page_number": 1,
"pdf_view": null,
"pdf_rotate": 0,
"pdf_user_unit": 1,
"zone_id": "…",
"zone_name": "Tenant Area A",
"zone_code": "TA-A",
"area_m2": 123.45,
"perimeter_m": 58.2,
"geometry": {
"schema_version": 1,
"type": "Polygon",
"coordinate_system": "pdf_page",
"points": []
},
"properties": {
"comment_1": "Example comment"
},
"external_ref": null,
"source_system": null,
"version": 1,
"status": "active",
"ifc_guid": null,
"created_by": "…",
"updated_by": null,
"created_at": "2026-06-01T00:00:00Z",
"updated_at": "2026-06-01T00:00:00Z",
"zone_type_id": "…",
"zone_type_key": "tenant_area",
"zone_type_name": "Leietakerareal",
"zone_type_category": "area",
"zone_type_color": "#3b82f6",
"zone_type_description": "Areal knyttet til leietaker",
"is_area_zone": true,
"is_ifc_exportable": true,
"ifc_class": "IfcSpace",
"ifc_object_type": "TenantArea",
"project_id": "…",
"project_name": "Energy Mapping 2026",
"project_number": "P-2026-001",
"project_description": "Kartlegging",
"project_contact_person": "Ola Nordmann",
"project_contact_email": "ola@example.com",
"project_zone_role": "included",
"project_zone_area_m2": 123.45,
"project_zone_properties": {},
"calibration_id": "…",
"calibration_method": "area",
"calibration_point_a": null,
"calibration_point_b": null,
"calibration_real_distance_m": null,
"meters_per_pdf_unit": 0.025,
"average_meters_per_pdf_unit": 0.025,
"average_pdf_units_per_meter": 40,
"calibration_source_rooms": [
{
"id": "room-1",
"name": "Rom 1",
"points": [],
"measuredAreaPdf2": 29440,
"realAreaM2": 18.4,
"metersPerPdfUnit": 0.025,
"pdfUnitsPerMeter": 40,
"deviationPercent": 1.8
}
],
"calibration_confidence": "high",
"calibration_max_deviation_percent": 2.4
}
]
}/zones/projectAll active zones linked to a project — directly via zones.project_id or via the project_zones link table. Project metadata and project_zone fields populate when the link exists.
| Name | Type | Required | Description |
|---|---|---|---|
| project_id | uuid | yes | Target project. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/project?project_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"floor_id": "…",
"floor_name": "Etasje 01",
"floor_code": "01",
"floor_number": 1,
"drawing_id": "…",
"drawing_name": "Plan 01",
"drawing_file_name": "plan_01.pdf",
"drawing_file_path": "property/building/floor/drawing/original.pdf",
"drawing_revision": "A",
"drawing_date": "2026-06-01",
"drawing_page_number": 1,
"pdf_view": null,
"pdf_rotate": 0,
"pdf_user_unit": 1,
"zone_id": "…",
"zone_name": "Tenant Area A",
"zone_code": "TA-A",
"area_m2": 123.45,
"perimeter_m": 58.2,
"geometry": {
"schema_version": 1,
"type": "Polygon",
"coordinate_system": "pdf_page",
"points": []
},
"properties": {
"comment_1": "Example comment"
},
"external_ref": null,
"source_system": null,
"version": 1,
"status": "active",
"ifc_guid": null,
"created_by": "…",
"updated_by": null,
"created_at": "2026-06-01T00:00:00Z",
"updated_at": "2026-06-01T00:00:00Z",
"zone_type_id": "…",
"zone_type_key": "tenant_area",
"zone_type_name": "Leietakerareal",
"zone_type_category": "area",
"zone_type_color": "#3b82f6",
"zone_type_description": "Areal knyttet til leietaker",
"is_area_zone": true,
"is_ifc_exportable": true,
"ifc_class": "IfcSpace",
"ifc_object_type": "TenantArea",
"project_id": "…",
"project_name": "Energy Mapping 2026",
"project_number": "P-2026-001",
"project_description": "Kartlegging",
"project_contact_person": "Ola Nordmann",
"project_contact_email": "ola@example.com",
"project_zone_role": "included",
"project_zone_area_m2": 123.45,
"project_zone_properties": {},
"calibration_id": "…",
"calibration_method": "area",
"calibration_point_a": null,
"calibration_point_b": null,
"calibration_real_distance_m": null,
"meters_per_pdf_unit": 0.025,
"average_meters_per_pdf_unit": 0.025,
"average_pdf_units_per_meter": 40,
"calibration_source_rooms": [
{
"id": "room-1",
"name": "Rom 1",
"points": [],
"measuredAreaPdf2": 29440,
"realAreaM2": 18.4,
"metersPerPdfUnit": 0.025,
"pdfUnitsPerMeter": 40,
"deviationPercent": 1.8
}
],
"calibration_confidence": "high",
"calibration_max_deviation_percent": 2.4
}
]
}Systems
/systems/customerAll systems under a customer, via properties.customer_id. Each row represents one system and one linked zone; if a system is not linked to a zone, zone fields may be null.
| Name | Type | Required | Description |
|---|---|---|---|
| customer_id | uuid | yes | Target customer. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/customer?customer_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"system_id": "…",
"system_code": "3601",
"system_sequence_no": 1,
"system_tag": "3601.001",
"system_name": "Ventilasjonssystem",
"system_status": "active",
"system_source": "excel_import",
"system_import_id": "…",
"system_project_id": "…",
"system_project_name": "Energy Mapping 2026",
"system_created_at": "2026-06-01T00:00:00Z",
"system_updated_at": "2026-06-01T00:00:00Z",
"system_zone_link_id": "…",
"system_zone_role": "serves",
"zone_id": "…",
"zone_name": "Tenant Area A",
"zone_code": "TA-A",
"zone_type_id": "…",
"zone_type_key": "tenant_area",
"zone_type_name": "Leietakerareal",
"zone_type_category": "area",
"floor_id": "…",
"floor_name": "Etasje 01",
"floor_code": "01",
"floor_number": 1,
"drawing_id": "…",
"drawing_name": "Plan 01",
"zone_area_m2": 123.45,
"zone_perimeter_m": 58.2,
"zone_properties": {}
}
]
}/systems/portfolioAll systems under a portfolio.
| Name | Type | Required | Description |
|---|---|---|---|
| portfolio_id | uuid | yes | Target portfolio. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/portfolio?portfolio_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"system_id": "…",
"system_code": "3601",
"system_sequence_no": 1,
"system_tag": "3601.001",
"system_name": "Ventilasjonssystem",
"system_status": "active",
"system_source": "excel_import",
"system_import_id": "…",
"system_project_id": "…",
"system_project_name": "Energy Mapping 2026",
"system_created_at": "2026-06-01T00:00:00Z",
"system_updated_at": "2026-06-01T00:00:00Z",
"system_zone_link_id": "…",
"system_zone_role": "serves",
"zone_id": "…",
"zone_name": "Tenant Area A",
"zone_code": "TA-A",
"zone_type_id": "…",
"zone_type_key": "tenant_area",
"zone_type_name": "Leietakerareal",
"zone_type_category": "area",
"floor_id": "…",
"floor_name": "Etasje 01",
"floor_code": "01",
"floor_number": 1,
"drawing_id": "…",
"drawing_name": "Plan 01",
"zone_area_m2": 123.45,
"zone_perimeter_m": 58.2,
"zone_properties": {}
}
]
}/systems/propertyAll systems under a property.
| Name | Type | Required | Description |
|---|---|---|---|
| property_id | uuid | yes | Target property. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/property?property_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"system_id": "…",
"system_code": "3601",
"system_sequence_no": 1,
"system_tag": "3601.001",
"system_name": "Ventilasjonssystem",
"system_status": "active",
"system_source": "excel_import",
"system_import_id": "…",
"system_project_id": "…",
"system_project_name": "Energy Mapping 2026",
"system_created_at": "2026-06-01T00:00:00Z",
"system_updated_at": "2026-06-01T00:00:00Z",
"system_zone_link_id": "…",
"system_zone_role": "serves",
"zone_id": "…",
"zone_name": "Tenant Area A",
"zone_code": "TA-A",
"zone_type_id": "…",
"zone_type_key": "tenant_area",
"zone_type_name": "Leietakerareal",
"zone_type_category": "area",
"floor_id": "…",
"floor_name": "Etasje 01",
"floor_code": "01",
"floor_number": 1,
"drawing_id": "…",
"drawing_name": "Plan 01",
"zone_area_m2": 123.45,
"zone_perimeter_m": 58.2,
"zone_properties": {}
}
]
}/systems/buildingAll systems inside a building.
| Name | Type | Required | Description |
|---|---|---|---|
| building_id | uuid | yes | Target building. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/building?building_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"system_id": "…",
"system_code": "3601",
"system_sequence_no": 1,
"system_tag": "3601.001",
"system_name": "Ventilasjonssystem",
"system_status": "active",
"system_source": "excel_import",
"system_import_id": "…",
"system_project_id": "…",
"system_project_name": "Energy Mapping 2026",
"system_created_at": "2026-06-01T00:00:00Z",
"system_updated_at": "2026-06-01T00:00:00Z",
"system_zone_link_id": "…",
"system_zone_role": "serves",
"zone_id": "…",
"zone_name": "Tenant Area A",
"zone_code": "TA-A",
"zone_type_id": "…",
"zone_type_key": "tenant_area",
"zone_type_name": "Leietakerareal",
"zone_type_category": "area",
"floor_id": "…",
"floor_name": "Etasje 01",
"floor_code": "01",
"floor_number": 1,
"drawing_id": "…",
"drawing_name": "Plan 01",
"zone_area_m2": 123.45,
"zone_perimeter_m": 58.2,
"zone_properties": {}
}
]
}Components
/components/customerAll components under a customer, via properties.customer_id. Each row represents one component and one linked system; if a component is not linked to a system, system fields may be null.
| Name | Type | Required | Description |
|---|---|---|---|
| customer_id | uuid | yes | Target customer. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/customer?customer_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"component_id": "…",
"component_code": "VAV",
"component_sequence_no": 1,
"component_tag": "VAV.001",
"component_name": "VAV-spjeld",
"component_status": "active",
"component_source": "excel_import",
"component_import_id": "…",
"component_project_id": "…",
"component_project_name": "Energy Mapping 2026",
"component_created_at": "2026-06-01T00:00:00Z",
"component_updated_at": "2026-06-01T00:00:00Z",
"component_type_id": "…",
"component_type_code": "VAV",
"component_type_name": "VAV-spjeld",
"component_type_category": "ventilation",
"component_type_description": "Variable air volume component",
"component_system_link_id": "…",
"component_system_role": "part_of",
"system_id": "…",
"system_code": "3601",
"system_sequence_no": 1,
"system_tag": "3601.001",
"system_name": "Ventilasjonssystem",
"system_status": "active",
"system_source": "excel_import",
"system_project_id": "…",
"system_project_name": "Energy Mapping 2026"
}
]
}/components/portfolioAll components under a portfolio.
| Name | Type | Required | Description |
|---|---|---|---|
| portfolio_id | uuid | yes | Target portfolio. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/portfolio?portfolio_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"component_id": "…",
"component_code": "VAV",
"component_sequence_no": 1,
"component_tag": "VAV.001",
"component_name": "VAV-spjeld",
"component_status": "active",
"component_source": "excel_import",
"component_import_id": "…",
"component_project_id": "…",
"component_project_name": "Energy Mapping 2026",
"component_created_at": "2026-06-01T00:00:00Z",
"component_updated_at": "2026-06-01T00:00:00Z",
"component_type_id": "…",
"component_type_code": "VAV",
"component_type_name": "VAV-spjeld",
"component_type_category": "ventilation",
"component_type_description": "Variable air volume component",
"component_system_link_id": "…",
"component_system_role": "part_of",
"system_id": "…",
"system_code": "3601",
"system_sequence_no": 1,
"system_tag": "3601.001",
"system_name": "Ventilasjonssystem",
"system_status": "active",
"system_source": "excel_import",
"system_project_id": "…",
"system_project_name": "Energy Mapping 2026"
}
]
}/components/propertyAll components under a property.
| Name | Type | Required | Description |
|---|---|---|---|
| property_id | uuid | yes | Target property. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/property?property_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"component_id": "…",
"component_code": "VAV",
"component_sequence_no": 1,
"component_tag": "VAV.001",
"component_name": "VAV-spjeld",
"component_status": "active",
"component_source": "excel_import",
"component_import_id": "…",
"component_project_id": "…",
"component_project_name": "Energy Mapping 2026",
"component_created_at": "2026-06-01T00:00:00Z",
"component_updated_at": "2026-06-01T00:00:00Z",
"component_type_id": "…",
"component_type_code": "VAV",
"component_type_name": "VAV-spjeld",
"component_type_category": "ventilation",
"component_type_description": "Variable air volume component",
"component_system_link_id": "…",
"component_system_role": "part_of",
"system_id": "…",
"system_code": "3601",
"system_sequence_no": 1,
"system_tag": "3601.001",
"system_name": "Ventilasjonssystem",
"system_status": "active",
"system_source": "excel_import",
"system_project_id": "…",
"system_project_name": "Energy Mapping 2026"
}
]
}/components/buildingAll components inside a building.
| Name | Type | Required | Description |
|---|---|---|---|
| building_id | uuid | yes | Target building. |
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/building?building_id=<uuid>"{
"data": [
{
"customer_id": "…",
"customer_company_name": "Acme AS",
"portfolio_id": "…",
"portfolio_name": "Oslo Portfolio",
"property_id": "…",
"property_name": "Storgata 42",
"property_address": "Storgata 42, Oslo",
"building_id": "…",
"building_name": "Bygg A",
"building_code": "A",
"building_address": "Storgata 42",
"component_id": "…",
"component_code": "VAV",
"component_sequence_no": 1,
"component_tag": "VAV.001",
"component_name": "VAV-spjeld",
"component_status": "active",
"component_source": "excel_import",
"component_import_id": "…",
"component_project_id": "…",
"component_project_name": "Energy Mapping 2026",
"component_created_at": "2026-06-01T00:00:00Z",
"component_updated_at": "2026-06-01T00:00:00Z",
"component_type_id": "…",
"component_type_code": "VAV",
"component_type_name": "VAV-spjeld",
"component_type_category": "ventilation",
"component_type_description": "Variable air volume component",
"component_system_link_id": "…",
"component_system_role": "part_of",
"system_id": "…",
"system_code": "3601",
"system_sequence_no": 1,
"system_tag": "3601.001",
"system_name": "Ventilasjonssystem",
"system_status": "active",
"system_source": "excel_import",
"system_project_id": "…",
"system_project_name": "Energy Mapping 2026"
}
]
}Dimensions
/dimensions/buildingsBuilding dimension table for BI joins.
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/dimensions/buildings"{
"data": [
{
"building_id": "…",
"building_name": "Bygg A",
"property_id": "…",
"property_name": "Storgata 42",
"portfolio_id": "…",
"portfolio_name": "Oslo Sentrum"
}
]
}/dimensions/propertiesProperty dimension table for BI joins.
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/dimensions/properties"{
"data": [
{
"property_id": "…",
"property_name": "Storgata 42",
"portfolio_id": "…",
"portfolio_name": "Oslo Sentrum",
"customer_id": "…",
"customer_name": "Acme AS"
}
]
}/dimensions/zone-typesZone type dimension table.
curl -H "Authorization: Bearer <your_api_key>" \
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/dimensions/zone-types"{
"data": [
{
"zone_type_id": "…",
"zone_type_name": "Leietakerareal",
"zone_type_key": "tenant_area",
"property_id": "…",
"color": "#3b82f6"
}
]
}Power BI (Power Query)
In Power BI Desktop choose Get Data → Blank Query → Advanced Editor and paste. The API returns { "data": [...] }, so unwrap the data array before calling Table.FromRecords:
let
Source = Json.Document(
Web.Contents(
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/property",
[
Query = [property_id = "<property_uuid>"],
Headers = [Authorization = "Bearer <your_api_key>"]
]
)
),
Data = Source[data],
Table = Table.FromRecords(Data)
in
TableSystems example
let
Source = Json.Document(
Web.Contents(
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/property",
[
Query = [property_id = "<property_uuid>"],
Headers = [Authorization = "Bearer <your_api_key>"]
]
)
),
Data = Source[data],
Table = Table.FromRecords(Data)
in
TableComponents example
let
Source = Json.Document(
Web.Contents(
"https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/property",
[
Query = [property_id = "<property_uuid>"],
Headers = [Authorization = "Bearer <your_api_key>"]
]
)
),
Data = Source[data],
Table = Table.FromRecords(Data)
in
TableStore the key in the Power BI data source credentials, not in the query text, when publishing.
Excel (From Web)
Data → Get Data → From Web → Advanced, then enter the URL and an HTTP request header. Excel receives JSON shaped as { "data": [...] } — in the Power Query editor, drill into the data list and convert it to a table.
Zones:
https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/property?property_id=<uuid>
Systems:
https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/property?property_id=<uuid>
Components:
https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/property?property_id=<uuid>
HTTP request header parameters:
Authorization: Bearer <your_api_key>