API
The flexpoold HTTP API: health, the OpenAPI 3.1 description and problem documents.
The machine-readable description is served by every daemon at /api/v1/openapi.json (OpenAPI 3.1) and committed in the repository as openapi/flexpoold.json.
| Method | Path | Answer |
|---|---|---|
GET | /healthz | {"status":"ok","version":"β¦","service":"flexpoold"} |
GET | /api/v1/openapi.json | The OpenAPI 3.1 document |
Sandbox (scenario mode only)π
| Method | Path | Answer |
|---|---|---|
GET | /api/v1/sandbox/clock | The test clock: now, scenario, day, next event, end |
POST | /api/v1/sandbox/clock/advance | {"to":"next-gate"} or an RFC 3339 instant β now and the events passed |
GET | /api/v1/market/day-ahead/prices?day= | Day-ahead prices as known at the test clock, with time unit and rule β or 425 not-yet-known |
Portfolioπ
Present when portfolio.dir is set β see Portfolio. Peers outside auth.trusted_networks need a bearer token, or get 401 unauthorized.
| Method | Path | Answer |
|---|---|---|
GET | /api/v1/portfolio | Pools with asset counts, kinds, MW and MWh, reserve groups; totals |
GET | /api/v1/assets?pool=&kind=&q=&after=&limit= | A page of assets (limit β€ 500, q β€ 64 characters, matching id, MaLo, SR-ID or TR-ID) and the cursor next |
GET | /api/v1/assets/{id} | One asset with its technical unit, reserve group, pool, owner and slices |
Without a portfolio these answer 404 not-found and say why.
Telemetryπ
Present with a portfolio β see Telemetry. In scenario mode every answer is as of the test clock.
| Method | Path | Answer |
|---|---|---|
GET | /api/v1/telemetry | Feed-in, consumption, net, stored energy and assets by quality, per pool and in total |
GET | /api/v1/assets/{id}/telemetry?day= | Latest values, the day's quarter hours up to now, the last 15 minutes |
GET | /api/v1/connections | Connections with state, last value, counters and last errors |
Asset rows carry their quality now, and /api/v1/assets?quality= filters by it.
Alarmsπ
Present with a portfolio β see Alarms: alarms, acknowledge, shelve, handover, notes, the journal and paging deliveries. Actions take JSON bodies only.
Forecastπ
See Forecast.
| Method | Path | Answer |
|---|---|---|
GET | /api/v1/forecasts/day-ahead?day=&model= | A day's quantile forecast (blend by default), with issued_at, gate and late |
POST | /api/v1/forecasts/day-ahead | Submit your model's forecast; the issue time is the server's |
GET | /api/v1/forecasts/day-ahead/ladder?days= | Every model scored on the last 1β28 days with known prices |
Planπ
See Plan. Paper only.
| Method | Path | Answer |
|---|---|---|
GET | /api/v1/plan/day-ahead?day=&model=&risk= | Per battery pool: schedule, state of charge, water values, protective limit orders, revenue across scenarios; committed from the gate on; result per pool once prices are published |
GET | /api/v1/plan/day-ahead/backtest?model=&risk= | The last 14 days with prices, each planned at its gate: paper, perfect foresight, capture per pool |
Bookπ
See Book: pre-trade checks, release, the kill switch, positions, the Fahrplan CSV and the nomination under /api/v1/book/β¦. Actions take JSON only.
Events and the flexibility marketπ
See Events and Flexibility market.
| Method | Path | What |
|---|---|---|
POST | /api/v1/events | Signed CloudEvents, one or a batch: flexibility requests, orders and settlements, erasures |
GET | /api/v1/flex/requests | Received requests and the offer drafted for each |
GET | /api/v1/flex/offers | Drafts and sent offers, with their split per battery |
POST | /api/v1/flex/offers/{id}/send | Send a draft (a person's decision) |
GET | /api/v1/flex/orders | Received orders |
GET | /api/v1/flex/settlements | Settlements and the verdict on each |
GET | /api/v1/flex/deliveries | The market webhooks' delivery log |
GET | /api/v1/erasures | Erasures and where each stands (Data protection) |
MCPπ
POST /mcp serves the read operations that declare x-mcp as Model Context Protocol tools. See Agents and MCP.
Errorsπ
Every error is application/problem+json (RFC 9457) with a stable code and the request id:
{
"type": "https://hupe1980.github.io/flexpool/problems/not-found/",
"title": "Not found",
"status": 404,
"code": "not-found",
"request_id": "01JFβ¦"
}The request_id is also in the x-request-id header and in the daemon's logs, so an operator can find the matching log line. Internal detail is never returned. All codes β
Limitsπ
| Limit | Default | Answer when exceeded |
|---|---|---|
| Request body | 1 MiB | 413 payload-too-large |
| Request duration | 30 s | 408 timeout |
| Requests in flight | 256 | 503 overloaded |
| Request headers | 16 KiB, read within 10 s | connection closed |