04 Epochs and CrossEpochs
Epochs
Epochs are time periods that describe a system configuration. When changes are made, e.g. by replacing a connected device, a new epoch is created for your plant.
Example
Epoch 2: "WR 3" was added
Epoch 3: "WR 2" was replaced by "WR 2B
ComponentIds and CrossEpochIds
ComponentIds (id) are newly created per epoch.
CrossEpochIds remain the same over the lifetime of the component.
Example API call
GET {{baseURL}}/api/v1/{{portal}}/datasource/plant/{{plantId}}/components/YYYY-MM-DD
Epoch 1
[
{
"id": "a2a62c37-...",
"mpptrackers": [
{...}
],
"moduleStrings": [],
"moduleField": null,
"crossEpochId": "abcd123...",
}
]
Epoch 2
[
{
"id": "e1bb9e02-...",
"mpptrackers": [
{...}
],
"moduleStrings": [],
"moduleField": null,
"crossEpochId": "abcd123...",
}
]
Epoch 3
[
{
"id": "0eb47529-...",
"mpptrackers": [
{...}
],
"moduleStrings": [],
"moduleField": null,
"crossEpochId": "xyz789...",
}
]
CrossEpochIds are necessary for components.
They are not available at the moment for MPP-Tracker or Inverter Strings.
For plant-level values these ids are not necessary.
CrossEpochIds for Sensors
Also Sensord do have CrossEpochIds.
GET {{baseURL}}/api/v1/{{portal}}/visualization/plant/{{plant}}/cross-epoch/channels?dateFrom=2024-11-14&dateTo=2024-11-14&xComponentIds[]={{xComponentId}}&xComponentIds[]={{xComponentId}}&channelNames[]=Irradiation&channelNames[]=TempModule&channelNames[]=Insolation
Querying Data with CrossEpochIds
To retrieve the data of the individual components of the epoch, the following API call is used:
GET {{baseURL}}/api/v1/{{portal}}/visualization/plant/{{plantId}}/cross-epoch/channels?....
Here, the parameter xComponentIds[]=
is used as a channel. This is provided through the aforementioned call and can be found under the variable "crossEpochId"
.
Additionally, the channel is needed to specify which data should be queried.
Example:
Call
{{baseURL}}/api/v1/{{portal}}/visualization/plant/{{plant}}/cross-epoch/channels?dateFrom={{dateFrom}}&dateTo={{dateTo}}&channelNames[]={{channelName}}&xComponentIds[]=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Parameter
GET https://api.enerest.world/api/v1/solarCompanyXYZ/visualization/plant/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/cross-epoch/channels?dateFrom=2024-01-01&dateTo=2024-01-01&channelNames[]=ProdPac&xComponentIds[]=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
baseURL =
https://api.enerest.world
DO NOT change this! It is the same for every user.
portal =
solarCompanyXYZ
Here you should add the first part of the portal URL.
Without
.enerest.world
plant = i.e.
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Add your plant ID here.
You can find this ID
in the
administration/plants
call orin the last part of the URL when you select the plant in the portal
E.g.
https://solarCompanyXYZ.enerest.world/administration/plants/detail/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
dateFrom =
2024-01-01
The date can be
today
orany date in the format
YYYY-MM-DD
dateTo =
2024-01-01
The date can be
today
orany date in the format
YYYY-MM-DD
channelName = ProdPac
Channels can be combined in a call.
The channel list will list all available channels.
xComponentIds =
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
The epoch component ID can be found in the component call.
With the xComponentId, the entire lifetime of the component can be requested, not just the current epoch.