Authentication
Every request carries your API key in the Authorization header.
Every request must be authenticated with your API key. The key is passed in the
Authorization header as the raw key; there is no Bearer prefix.
Authorization: your_api_keycurl -G "https://api.rebase.energy/weather/v2/point/operational" \
-H "Authorization: your_api_key" \
--data-urlencode "model=DWD_ICON-EU" \
--data-urlencode "latitude=60.1" \
--data-urlencode "longitude=16.5" \
--data-urlencode "variables=Temperature"import requests
headers = {"Authorization": "your_api_key"}
resp = requests.get(
"https://api.rebase.energy/weather/v2/point/operational",
headers=headers,
params={
"model": "DWD_ICON-EU",
"latitude": 60.1,
"longitude": 16.5,
"variables": "Temperature",
},
)Query-parameter fallback
Some HTTP clients drop the Authorization header when following redirects (the /query
endpoint redirects internally to the operational or historical handler). For those clients
you can pass the key as an api_key query parameter instead:
https://api.rebase.energy/weather/v2/query?api_key=your_api_key&model=...Prefer the header where possible; the query parameter is only a fallback because URLs (and their query strings) are more likely to be logged.
Getting and managing a key
API keys are issued from your Rebase account. If you don't have one yet, contact Rebase to get access.
To try a call from the API Reference, enter the key in the playground of the endpoint.
Errors
A missing or invalid key returns 401 Unauthorized; a key without access to the requested
resource returns 403 Forbidden. See Errors for the full list of status codes.