TindX

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.

http
Authorization: Bearer tindx_live_xxxxxxxxxxxxxxxx
bash
curl -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/project only

Note: /systems/* and /components/* support customer, portfolio, property and building scopes. They do not support project scope.

Status codes

200OK
400Missing parameter / wrong method
401Missing or invalid API key
403Revoked or expired API key
404Unknown route
500Server / 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:

bash
supabase functions deploy external-api --no-verify-jwt

The Supabase service role key must be configured as a Supabase secret only:

bash
supabase secrets set SUPABASE_SERVICE_ROLE_KEY=<service_role_key>
supabase secrets set SUPABASE_URL=https://fgeutaynbzlbdoulzvmh.supabase.co

Never 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.

http
GET https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/status

Status

GET
/status
no auth

Unauthenticated health check. Try this first.

curl
bash
curl "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/status"
Example response
json
{
  "status": "ok",
  "time": "2026-06-01T00:00:00Z"
}

Zones

GET
/zones/customer

All 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.

Query parameters
NameTypeRequiredDescription
customer_iduuidyesTarget customer.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/customer?customer_id=<uuid>"
Example response
json
{
  "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
    }
  ]
}
GET
/zones/portfolio

All active zones under a portfolio. Same rich flat row as /zones/customer.

Query parameters
NameTypeRequiredDescription
portfolio_iduuidyesTarget portfolio.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/portfolio?portfolio_id=<uuid>"
Example response
json
{
  "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
    }
  ]
}
GET
/zones/property

All active zones under a property (all buildings & floors).

Query parameters
NameTypeRequiredDescription
property_iduuidyesTarget property.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/property?property_id=<uuid>"
Example response
json
{
  "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
    }
  ]
}
GET
/zones/building

All active zones inside a building.

Query parameters
NameTypeRequiredDescription
building_iduuidyesTarget building.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/building?building_id=<uuid>"
Example response
json
{
  "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
    }
  ]
}
GET
/zones/project

All 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.

Query parameters
NameTypeRequiredDescription
project_iduuidyesTarget project.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/zones/project?project_id=<uuid>"
Example response
json
{
  "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

GET
/systems/customer

All 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.

Query parameters
NameTypeRequiredDescription
customer_iduuidyesTarget customer.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/customer?customer_id=<uuid>"
Example response
json
{
  "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": {}
    }
  ]
}
GET
/systems/portfolio

All systems under a portfolio.

Query parameters
NameTypeRequiredDescription
portfolio_iduuidyesTarget portfolio.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/portfolio?portfolio_id=<uuid>"
Example response
json
{
  "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": {}
    }
  ]
}
GET
/systems/property

All systems under a property.

Query parameters
NameTypeRequiredDescription
property_iduuidyesTarget property.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/property?property_id=<uuid>"
Example response
json
{
  "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": {}
    }
  ]
}
GET
/systems/building

All systems inside a building.

Query parameters
NameTypeRequiredDescription
building_iduuidyesTarget building.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/systems/building?building_id=<uuid>"
Example response
json
{
  "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

GET
/components/customer

All 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.

Query parameters
NameTypeRequiredDescription
customer_iduuidyesTarget customer.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/customer?customer_id=<uuid>"
Example response
json
{
  "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"
    }
  ]
}
GET
/components/portfolio

All components under a portfolio.

Query parameters
NameTypeRequiredDescription
portfolio_iduuidyesTarget portfolio.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/portfolio?portfolio_id=<uuid>"
Example response
json
{
  "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"
    }
  ]
}
GET
/components/property

All components under a property.

Query parameters
NameTypeRequiredDescription
property_iduuidyesTarget property.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/property?property_id=<uuid>"
Example response
json
{
  "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"
    }
  ]
}
GET
/components/building

All components inside a building.

Query parameters
NameTypeRequiredDescription
building_iduuidyesTarget building.
curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/components/building?building_id=<uuid>"
Example response
json
{
  "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

GET
/dimensions/buildings

Building dimension table for BI joins.

curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/dimensions/buildings"
Example response
json
{
  "data": [
    {
      "building_id": "…",
      "building_name": "Bygg A",
      "property_id": "…",
      "property_name": "Storgata 42",
      "portfolio_id": "…",
      "portfolio_name": "Oslo Sentrum"
    }
  ]
}
GET
/dimensions/properties

Property dimension table for BI joins.

curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/dimensions/properties"
Example response
json
{
  "data": [
    {
      "property_id": "…",
      "property_name": "Storgata 42",
      "portfolio_id": "…",
      "portfolio_name": "Oslo Sentrum",
      "customer_id": "…",
      "customer_name": "Acme AS"
    }
  ]
}
GET
/dimensions/zone-types

Zone type dimension table.

curl
bash
curl -H "Authorization: Bearer <your_api_key>" \
  "https://fgeutaynbzlbdoulzvmh.supabase.co/functions/v1/external-api/dimensions/zone-types"
Example response
json
{
  "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:

m
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
    Table

Systems example

m
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
    Table

Components example

m
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
    Table

Store 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.

text
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>