Upload measured generation or consumption data to a site
ML forecasting models require training with measured/observed data, such as power generation data (for wind or solar sites) or consumption data (for load sites).
Ensure that the power values are provided in kilowatts [kW].
Upload measured data
Copy
import requestsapi_key = "Your API key" # Set your API keysite_id = "a923653c-26f1-1b29-955d-ffde5d182276" # Set the site IDpayload = { "data": [ { "valid_time": "2022-05-16T13:00:00Z", "value": 140.0 }, { "valid_time": "2022-05-16T14:00:00Z", "value": 510.0 }, { "valid_time": "2022-05-16T15:00:00Z", "value": 1260.0 } ]}url = f"https://api.rebase.energy/platform/v2/sites/{site_id}/actual"headers = {"Authorization": api_key, "Content-Type": "application/json"}response = requests.post(url, json=payload, headers=headers)response.raise_for_status()response = response.json()