rebase.energy

How to query a timeseries for a site

Read flat and multiindex series, filter by valid_time and knowledge_time, and trace per-run provenance.

The same endpoint serves flat and multiindex series. Query parameters narrow the result, and for multiindex series they select which forecast run(s) you get back.

  • GET /platform/v3/objects/sites/{siteId}/timeseries/{type} — read a series, with filters.
  • GET /platform/v3/objects/sites/{siteId}/timeseries — list series on the site.

Query a flat series

start and end bound the valid_time range:

import requests

site_id = "4dbb3433-402f-4276-8a55-7f27753f70dc"
url = f"https://api.rebaseenergy.dev/platform/v3/objects/sites/{site_id}/timeseries/power"
headers = {"Authorization": "Bearer <your_api_key>"}

params = {"start": "2026-06-01T00:00:00Z", "end": "2026-06-03T00:00:00Z"}

response = requests.get(url, headers=headers, params=params)
print(response.json())
{
  "type": "power",
  "unit": "kW",
  "shape": "flat",
  "points": [
    {"valid_time": "2026-06-02T23:00:00Z", "value": 5400}
  ]
}

Query the latest forecast run

For multiindex series, knowledge_time=latest returns the single most recent run — one coherent forecast. It does not blend points from different runs.

import requests

site_id = "4dbb3433-402f-4276-8a55-7f27753f70dc"
url = f"https://api.rebaseenergy.dev/platform/v3/objects/sites/{site_id}/timeseries/power-forecast"
headers = {"Authorization": "Bearer <your_api_key>"}

params = {
    "knowledge_time": "latest",
    "start": "2026-06-03T07:00:00Z",
    "end": "2026-06-04T07:00:00Z",
}

response = requests.get(url, headers=headers, params=params)
print(response.json())

Returned points keep their knowledge_time and value columns, so the payload is self-describing.

Query a forecast as-of a moment

For backtests you want the run that was current at some instant — the latest knowledge_time at or before it:

params = {
    "knowledge_time": "as-of:2026-06-03T06:30:00Z",
    "start": "2026-06-03T07:00:00Z",
    "end": "2026-06-04T07:00:00Z",
}

You can also pass an exact value ("knowledge_time": "2026-06-03T06:00:00Z") to pin a specific run.

Select columns

By default a point carries every column. Pass columns to return only the ones you need — handy for pulling a single quantile band out of a fan:

params = {"knowledge_time": "latest", "columns": "q50"}

Each returned point then carries just valid_time, knowledge_time, and q50.

Per-knowledge_time provenance

Each knowledge_time slice maps to exactly one workflow run. Pass include=provenance to get the lineage of every run in the result:

import requests

site_id = "4dbb3433-402f-4276-8a55-7f27753f70dc"
url = f"https://api.rebaseenergy.dev/platform/v3/objects/sites/{site_id}/timeseries/power-forecast"
headers = {"Authorization": "Bearer <your_api_key>"}

params = {"knowledge_time": "latest", "include": "provenance"}

response = requests.get(url, headers=headers, params=params)
print(response.json())
{
  "type": "power-forecast",
  "unit": "kW",
  "shape": "multiindex",
  "points": [
    {"valid_time": "2026-06-03T07:00:00Z", "knowledge_time": "2026-06-03T06:00:00Z",
     "q10": 4200, "q50": 5100, "q90": 6300}
  ],
  "provenance": {
    "2026-06-03T06:00:00Z": {
      "run_id": "b21f0c4e-7d18-4a90-bb3e-2c5a9f0e1d77",
      "workflow_id": "0f3c9a55-1e22-4d6b-9aa1-7e8b2c4d5f60",
      "workflow_version": 3
    }
  }
}

The provenance block is keyed by knowledge_time: every distinct run in the result ties back to the workflow run and the exact workflow version that produced it. See create a workflow for how a run sets the knowledge_time in the first place.

List series on the site

import requests

site_id = "4dbb3433-402f-4276-8a55-7f27753f70dc"
url = f"https://api.rebaseenergy.dev/platform/v3/objects/sites/{site_id}/timeseries"
headers = {"Authorization": "Bearer <your_api_key>"}

response = requests.get(url, headers=headers)
print(response.json())

The listing covers both series created on the site directly and standalone series linked to it — each entry carries the series id, which is also addressable at /platform/v3/timeseries/{timeseriesId}.

The same endpoints work on any object — swap sites for assets, met-masts, or any custom type.

Open questions

knowledge_time=latest returns one coherent run. Do we also want a per-valid_time latest — the newest known value at each timestamp, possibly mixing runs — e.g. knowledge_time=latest-per-valid-time? And should include=provenance be default-on for multiindex series, or opt-in to keep payloads small?

On this page