OpenEnergyPlatform / OpenEnergyPlatform/oeplatform
The client page: the nine semantic rules of the scenario-bundle API
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 65
- Forks
- 29
- Avg merge
- 15h 25m
- Merged PRs (30d)
- 32
Description
Parent
Spec: #2454 — Document and teach the OEKG REST API. Derived from WF-14 decisions D5 and D8.
What to build
A client author reads one page and learns the behaviour a signature cannot express — the rules they would otherwise discover by hitting a 400. Everything mechanical (If-Match, ?confirm=, ?expand=, the 428/412/409 table, RDF negotiation) stays in the reference and is not restated here.
The nine rules:
- A key absent from a payload means untouched, under every verb.
_metais read-only and ignored on write.- Delete-by-omission exists on
replace/and nowhere else. - A bundle
POSTaccepts nested sub-resources; aPATCHdoes not. - The delete's two guards cover two different accidents — stale state and wrong uuid — so neither is redundant ceremony.
- A write is judged by the violations it introduces; a create is strict because it has no pre-state. A client seeing
400on create where aPATCHsucceeded otherwise reads it as a bug. ref: tableis reproducible,ref: datasetis current; a dead link stays and readsresolvable: false, which is correct rather than broken.- The server mints the uid; a stateless pipeline re-identifies with
GET ?acronym=, which also yields theETag. _meta.history_recordedcan readfalseinside a successful write — a named audit gap, not a status flag.
Acceptance criteria
- A new page under the OEKG API section carries all nine rules.
- Each rule has a worked request and response example.
- Each rule links the reference at its tag anchor rather than restating the endpoint table.
- The page does not repeat mechanical facts that the reference already carries as annotations.
- Changelog entry.
Blocked by
- #2459 — the endpoint-group tags — the rules link by tag anchor, so the anchors must be stable and singular first.
And by the API itself. Checked against the routes on develop (2026-09-15): four of the nine rules describe behaviour that does not exist yet, so this page cannot ship honestly before those slices land. The endpoints present today are the collection POST, the detail GET/PATCH, history, scenarios, study reports and dataset links — there is no DELETE, no replace/, no ?acronym= and no link resolution.
| rule | state today |
|---|---|
| 1, 2, 4, 6, 9 | built — documentable now |
7 (ref: table vs ref: dataset; a dead link reads resolvable: false) |
half — the semantics exist, the resolution flag is Say whether a linked dataset is still there |
8 (server mints the uid; re-identify with GET ?acronym=) |
half — the minting exists, the lookup is The read side, completed |
3 (delete-by-omission only on replace/) |
no endpoint — Replace the whole bundle in one call |
| 5 (the delete's two guards) | no endpoint — Delete a whole bundle, in two steps |
Those four slices are tracked in the maintainer's vault, not here. A page promising nine rules while four of them point at 404s would be worse than no page.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the OEKG API section, the reference tag anchors from #2459, and the routes on develop; confirm which of the nine rules are currently documentable. Done means a new page includes all nine rules with worked request/response examples, reference links, no duplicated mechanical annotations, and a changelog entry after the blocked API slices land.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100