Events

In addition to the request/response API, new forecast availability is published to a Kafka event stream, so you can react as soon as a model run is ingested instead of polling. Events are consumed through a Kafka REST proxy.

  • Topic: datahub_weather
  • Auth: the same API key, in the Authorization header.

The events REST proxy base URL is environment-specific. Confirm the exact host for your account with Rebase; the flow below is the standard Kafka REST proxy sequence and is shown against a placeholder base https://events.rebase.energy/rest.

Consuming events

The flow is the standard three steps of a Kafka REST proxy: create a consumer instance, subscribe it to the topic, then poll for records.

1. Create a consumer + instance

curl -X POST https://events.rebase.energy/rest/consumers/my_consumer \
  -H "Authorization: your_api_key" \
  -H "Content-Type: application/vnd.kafka.v2+json" \
  -d '{"name": "my_instance", "format": "json", "auto.offset.reset": "latest"}'
# -> { "instance_id": "my_instance", "base_uri": ".../consumers/my_consumer/instances/my_instance" }

2. Subscribe to the topic

curl -X POST https://events.rebase.energy/rest/consumers/my_consumer/instances/my_instance/subscription \
  -H "Authorization: your_api_key" \
  -H "Content-Type: application/vnd.kafka.v2+json" \
  -d '{"topics": ["datahub_weather"]}'
# -> HTTP 204 No Content

3. Poll for records

curl -X GET https://events.rebase.energy/rest/consumers/my_consumer/instances/my_instance/records \
  -H "Authorization: your_api_key" \
  -H "Accept: application/vnd.kafka.json.v2+json"

Event payload

Each record's value describes a newly available forecast:

{
  "model": "DWD_ICON-EU",
  "timestamp": "2026-06-30T06:42:00Z",
  "type": 1,
  "reference_time": "2026-06-30T06:00:00Z",
  "message": "...",
  "info": {}
}
Field Description
model Model identifier the event is for
timestamp UTC time the event was published
type Event type (currently always 1)
reference_time Reference (run) time of the newly available forecast
message Human-readable description
info Additional metadata

When you receive an event, query the corresponding forecast via the forecast endpoints using the model and reference_time from the payload.