Viteco Viteco WeatherAPI & integratie

Portal API

De publieke API levert gevalideerde weerhistorie en voorspellingen uit de portal-database. De providerlaag blijft uitsluitend intern.

Beschikbare endpoints

Alle endpoints staan onder /api/ en gebruiken dezelfde Basic Auth als de portal.

Basisroute/api/
AuthBasic Authzelfde login als portal
StationDe Bilt260

Historie

Uur- of dagwaarden uit weather_history.

curl

curl -u 'GEBRUIKER:WACHTWOORD' \
  'https://weather.viteco.tech/api/stations/260/history?period=month&granularity=hourly&start=2026-07-20T00:00:00Z&end=2026-07-25T00:00:00Z&variables=temperature,humidity,global_radiation,precipitation,wind_speed'

JavaScript

const credentials = btoa("GEBRUIKER:WACHTWOORD");
const response = await fetch("/api/stations/260/history?period=month&granularity=hourly", {
  headers: { Authorization: `Basic ${credentials}`, Accept: "application/json" },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();

Voorspelling

Beschikbare forecast-punten uit weather_forecast_points.

curl

curl -u 'GEBRUIKER:WACHTWOORD' \
  'https://weather.viteco.tech/api/stations/260/forecast?start=2026-07-25T00:00:00Z&end=2026-07-27T00:00:00Z'

Python

import requests

response = requests.get(
    "https://weather.viteco.tech/api/stations/260/forecast",
    params={"start": "2026-07-25T00:00:00Z", "end": "2026-07-27T00:00:00Z"},
    auth=("GEBRUIKER", "WACHTWOORD"), timeout=30,
)
response.raise_for_status()
data = response.json()