Energy

API endpoints for retrieving Energy report data

Note: Ardexa hosts clouds in multiple regions as subdomains of ardexa.com. Where you see a reference to mycloud in this document, replace it with the appropriate subdomain for your cloud, eg: mycloud.ardexa.com -> app.ardexa.com or eur1.ardexa.com

Get Daily Energy

GET https://[mycloud].ardexa.com/api/v1/orgs/:workgroupId/daily-energy

Returns daily energy values calculated within the Ardexa Cloud. Note: Daily energy values are calculated on a daily basis up to the previous day. Workgroup-specific date semantics are defined in the Daily Energy report configuration.

Path Parameters

NameTypeDescription

workgroupId

string

Workgroup ID

Query Parameters

NameTypeDescription

devices

array

List of device IDs

groupBy

string

'source' => return results for individual sources

startDate

string

Start of date range, format YYYY-MM-DD

endDate

string

End of date range, format YYYY-MM-DD. Results will include energy produced on this day

Headers

NameTypeDescription

Authorization

string

Authorization token, format 'Bearer $token'

// General:
{
  "<startDate>": {
    "<deviceId-1>[.<source-1>]": <Energy in Wh>,
    "<deviceId-n>[.<source-m>]": <Energy in Wh>
  },
  ...,
  "<endDate>": {
    "<deviceId-1>[.<source-1>]": <Energy in Wh>,
    "<deviceId-n>[.<source-m>]": <Energy in Wh>    
  }
}

// Device-level
// GET /api/v1/orgs/myWorkgroupId/daily-energy?startDate=2020-11-19&endDate=2020-11-19
{
  "2020-11-19": {
    "cc4daca2-cd07-48ec-9ecd-71d37c7afd04": 10000,
    "3c4c51d4-eedb-48ee-bd6c-fd85f03e6876": 20000,
  }
}

// Source-level
// GET /api/v1/orgs/myWorkgroupId/daily-energy?groupBy=source&startDate=2020-11-19&endDate=2020-11-19
{
  "2020-11-19": {
    "cc4daca2-cd07-48ec-9ecd-71d37c7afd04.source1": 6000,
    "cc4daca2-cd07-48ec-9ecd-71d37c7afd04.source2": 4000,
    "3c4c51d4-eedb-48ee-bd6c-fd85f03e6876.source1": 7000,
    "3c4c51d4-eedb-48ee-bd6c-fd85f03e6876.source2": 8000,
    "3c4c51d4-eedb-48ee-bd6c-fd85f03e6876.source3": 5000
  }
}

Get Budget Data

GET https://[mycloud].ardexa.com/api/v1/orgs/:workgroupId/budget-data

Returns energy budget values uploaded to the Ardexa Cloud.

Path Parameters

NameTypeDescription

workgroupId*

string

Workgroup to retrieve budget data from

Query Parameters

NameTypeDescription

timezone

string

Timezone identifier, specifying the timezone to align budget data to. Default: Etc/UTC

endDate*

string

End of date range, YYYY-MM-DD format

startDate*

string

Start of date range, YYYY-MM-DD format

meterCodes

string

List of meter codes to retrieve budget data for

Headers

NameTypeDescription

Authorization*

string

API token, format 'Bearer $token'

{
  "2021-01-07": {
    "meter-code-1": 25,
    "meter-code-2": 50
  },
  "2021-01-06": {
    "meter-code-1": 30
    "meter-code-2": 40

Get Meter Data

GET https://[mycloud].ardexa.com/api/v1/orgs/:workgroupId/meter-data

Path Parameters

NameTypeDescription

workgroupId*

String

Workgroup to retrieve meter data from.

Query Parameters

NameTypeDescription

startDate*

String

Start of date range, YYYY-MM-DD format

endDate*

String

End of date range, YYYY-MM-DD format

timezone

String

Timezone identifier, specifying the timezone to align meter data to. Default: Etc/UTC

meterCodes

Array[String]

List of meter codes to retrieve data for

granularity

String

Data granularity: default 'daily'. Specify '15m' for 15-minute readings.

Headers

NameTypeDescription

Authorization*

String

API token, format 'Bearer $token'

{
  "YYYY-MM-DD": {
    "meter-code-1": <daily-value-kWh>,
    "meter-code-2": <daily-value-kWh>
}

Last updated