Skip to main content

Get forecasts for balancing group

Base URL: https://api.tensorenergy.jp/v1

Path: /forecasts/balancing-group/{BALANCING_GROUP_ID}

Method: GET

Query parameters

FieldTypeDescriptionRequired
fromstringSpecifies the starting time to retrieve generation forecasts from, expressed in the format 2006-01-02T15:04:05Z.true
tostringSpecifies the ending time for the interval to retrieve generation forecasts to, expressed in the format 2006-01-02T15:04:05Z. The interval between from and to cannot exceed 14 days.true
generationstringSpecifies the forecast generation time. Acceptable values are latest, dayAhead, or a timestamp.false
offsetintegerSpecifies the offset from the generation forecast time slot in seconds.false

Response

The response is a non-nullable JSON object with the following fields:

FieldTypeDescription
data[ForecastSet] | nullReturned data from the query. If error is non-null, then this value will be null.
errorError | nullAny error returned from the query. If data is non-null, then this value will be null.

ForecastSet Object

FieldTypeDescription
datetimestringDate and time for the slot, expressed as an ISO 8601 compliant UTC timestamp.
total_kwhfloatTotal amount of forecasted generation, expressed in kilowatt hour (kWh).
valuesarrayAsset forecasted values for the slot. Each entry includes asset_id and value_kwh.

Error object

FieldTypeDescription
messagestringMessage that explains what went wrong.
codeinternal_server_error | not_authorized | invalid_query_parameter | resource_not_foundError code that occurred.

Example request

curl --request GET \
--url https://api.tensorenergy.jp/v1/forecasts/balancing-group/abc123?from=2024-01-01T00:00:00Z&to=2024-01-02T00:00:00Z&generation=latest&offset=3600 \
--header "authorization: Bearer ${API_TOKEN}"

Example responses

Successful response

{
"data": [
{
"datetime": "2024-01-01T00:00:00Z",
"total_kwh": 100.5,
"values": [
{
"asset_id": "51d5ffcf-1347-4277-93e8-dfca140fe8b3",
"value_kwh": 10.1
},
{
"asset_id": "7c97f8f2-8d50-4a77-9282-f9a16387dcbf",
"value_kwh": 20.3
}
]
},
{
"datetime": "2024-01-01T01:00:00Z",
"total_kwh": 110.7,
"values": [
{
"asset_id": "51d5ffcf-1347-4277-93e8-dfca140fe8b3",
"value_kwh": 15.2
},
{
"asset_id": "7c97f8f2-8d50-4a77-9282-f9a16387dcbf",
"value_kwh": 25.4
}
]
}
],
"error": null
}

Error occurs during operation

{
"data": null,
"error": {
"message": "something went wrong during the process",
"code": "internal_server_error"
}
}

No forecasts available for the asset

{
"data": [],
"error": null
}