Energy data is defined in our data model as KPIs. Those KPIs, once defined in the OAP, are available for query in Connect. It is possible to query all KPI definitions as well as KPIs specific to buildings or portfolios. A list of all KPI-related queries can be found below.
All KPI definitions
This query is on the OAP API, so users will go to this endpoint: https://oap.connect.noda.ai/api
query {
kpis {
deprecated
code
name
description
isBase
extends
ranges {
set
name
description
}
rollupIntervals {
set
name
description
}
rollupCalculations {
set
name
description
}
normalizations {
set
name
description
}
comparisons {
set
name
description
}
units {
type
name
description
}
rangeFilters {
set
name
description
}
profileWindows {
set
name
description
}
}
}
Query KPIs on Site/Building
This query is on the OAP API, so users will go to this endpoint:
query {
sites(version: "1.1") {
code
name
isBase
extends
kpis {
code
name
description
inputs {
code
}
}
}
}
Query KPIs on Equipment
This query is on the OAP API, so users will go to this endpoint:
query {
equipment(version: "1.1") {
code
name
isBase
extends
kpis {
code
name
description
inputs {
code
}
}
}
}
Query KPIs on Space
This query is on the OAP API, so users will go to this endpoint:
query {
spaces(version: "1.1") {
code
name
isBase
extends
kpis {
code
name
description
inputs {
code
}
}
}
See the available KPIs on a Building
This query is on the Connect API, so users will go to this endpoint:
query {
building(id: "f3a390ef-8e97-46be-aa4e-5785c5d5a938") {
id
name
availableKpis {
code
name
inputs
comparisons
normalizations
rollupCalculations
rollupIntervals
minRollupInterval
rangeStartDate
units
}
}
}
Query the kpi data for a specific KPI on a Building
This query is on the Connect API, so users will go to this endpoint:
query {
building(id: "f3a390ef-8e97-46be-aa4e-5785c5d5a938") {
id
name
kpi(
input: {
kpiCode: "TEEC"
rollupCalculation: "sum"
rollupInterval: "month"
rangeType: "date"
startTimestamp: "2022-11-01T00:00:00.000020+05:30"
endTimestamp: "2022-11-20T00:00:00.000020+05:30"
}
) {
unit
keyType
values {
key
value
comparison
}
}
}
}
Query the kpi data for a specific KPI with comparison (previous_month or previous_year or portfolio_average) on a Building
This query is on the Connect API, so users will go to this endpoint:
query {
building(id: "f3a390ef-8e97-46be-aa4e-5785c5d5a938") {
id
name
kpi(
input: {
kpiCode: "TEC"
inputKpiCodes: ["TEEC", "TNGEC"]
rollupCalculation: "sum"
rollupInterval: "range"
rangeType: "date"
startTimestamp: "2022-11-01T00:00:00.000020+05:30"
endTimestamp: "2022-11-20T00:00:00.000020+05:30"
comparison: "previous_month"
}
) {
unit
keyType
values {
key
value
comparison
}
}
}
}
Query the kpi data for a specific KPI with comparison and normalization (such as "area") on a Building
This query is on the Connect API, so users will go to this endpoint:
query {
building(id: "f3a390ef-8e97-46be-aa4e-5785c5d5a938") {
id
name
kpi(
input: {
kpiCode: "TEC"
inputKpiCodes: ["TEEC"]
rollupCalculation: "sum"
rollupInterval: "range"
rangeType: "date"
startTimestamp: "2022-11-01T00:00:00.000020+05:30"
endTimestamp: "2022-11-20T00:00:00.000020+05:30"
comparison: "previous_month"
normalizations: ["area"]
}
) {
unit
keyType
values {
key
value
comparison
}
}
}
}