--- name: ontario-energy-board-track-case-filings description: Track every document filed in an Ontario Energy Board proceeding — search the regulatory record by case number, page through the results, and download the filed PDFs. api: ontario-energy-board:oeb-regulatory-document-search generated: '2026-07-27' method: generated source: openapi/ontario-energy-board-rds-openapi.yml operations: - searchRecords - downloadRecordDocument - getSearchClauseDefinitions --- # Track filings in an OEB case The Ontario Energy Board's Regulatory Document Search (RDS) holds every filing, decision, order, licence and piece of correspondence in the Board's case record. It answers anonymously and it will return JSON if you ask for it. Nothing here requires a key, a signup or a terms click-through. **Read this first.** The OEB has never documented this interface. The spec you are working from (`openapi/ontario-energy-board-rds-openapi.yml`) was generated by API Evangelist from live probes, and every operation carries an `x-evidence` block naming the exact URL that was tried and what came back. The interface is real; the support commitment is zero. Design for it changing. ## Steps 1. **Know your clause before you query.** The `q` parameter takes one of 303 published search clauses. Call `getSearchClauseDefinitions` (`GET /Help/WDSearchClauseDefJS?trimType=Record`) or read the parsed catalogue at `vocabulary/ontario-energy-board-rds-search-clauses.yml`. The clauses that matter for regulatory work are the OEB's own: `CaseNumber`, `EnergyType`, `Applicant`, `PrimaryApplicationType`, `SIDocumentType`, `OEBDocumentType`, `DateIssued`, `fDateReceived`. 2. **Search the case.** Call `searchRecords`: ``` GET https://www.rds.oeb.ca/CMWebDrawer/Record ?q=CaseNumber=EB-2021-0183 &sortBy=recRegisteredOn- &pageSize=400 &format=json ``` `format=json` is what turns the HTML results page into the Content Manager `TRIMServiceAPIModel` payload. Without it you get HTML. With `format=xml` you get HTTP 403. 3. **Check `SearchTitle` before you trust the result.** This is the single most important step and the one every naive client skips. A rejected query returns **HTTP 200** with an empty `Results` array and the reason in plain English in `SearchTitle` — for example `"You have specified an unknown search method 'NotAField'"`, or `"When using a comparison operator (=) you cannot specify a list of values"` if you tried a wildcard. Zero results plus a sentence in `SearchTitle` is an error, not an empty case. See `errors/ontario-energy-board-problem-types.yml`. 4. **Page with `start`, not with a cursor.** `TotalResults` gives the full match count irrespective of `pageSize`, so you can plan the whole walk up front. `start` is 1-based; `HasMoreItems` flags a further page. Use `sortBy` with a trailing `-` for descending — only the 87 clauses whose definition says `CanSort: true` may be used there. 5. **Read the fields off each hit.** Every record carries `Uri`, `RecordTitle`, `RecordExtension` (PDF, MSG, DOC, XLS — check it before assuming PDF), `RecordDateModified`, and a `Fields` object with `CaseNumber`, `SIDocumentType`, `Applicant` (a `LocationRef` with its own Uri), `EnergyType`, `PrimaryApplicationType`, `DateIssued` and `fDateReceived`. 6. **Treat cleared dates as null.** A `TrimDateTime` with `IsClear: true` reports `0001-01-01T00:00:00.0000000Z`. That means "not set". Never store it as a real date. 7. **Download the document.** Call `downloadRecordDocument`: ``` GET https://www.rds.oeb.ca/CMWebDrawer/Record/891285/File/document ``` Anonymous, HTTP 200, `application/pdf`. A 404 returns the WebDrawer **HTML** error page — handle the content-type switch, never parse a 404 body as JSON. 8. **Do not call `getRecord`.** `GET /Record/{uri}` returns HTTP 500 with `"Error retrieving data for property RecordContainer. Access denied."` (TrimErrorCode 22760) for anonymous callers. Everything you need is already on the search hit. The operation is in the spec because it was probed, not because it works. ## Conventions that apply - **Authentication:** none. Do not send credentials; there is nothing to send. - **Idempotency:** not applicable — the surface is strictly read-only, there is no write operation anywhere, and GETs are naturally safe to retry. - **Caching:** RDS marks responses `Cache-Control: private`. Do not put search results in a shared cache. - **Versioning:** none. No version segment, header or parameter, and no announcement channel. - **Rate limiting:** RDS held up under repeated querying on 2026-07-27, but nothing is published. Be polite; the sibling host `www.oeb.ca` stops answering entirely under parallel load. ## Worked example Case **EB-2021-0183** is the Green Button implementation consultation — the proceeding through which Ontario made energy-data sharing compulsory. `q=CaseNumber=EB-2021-0183` returned **40 records** on 2026-07-27, including the March 2025 Decision and Order on Cost Awards (`Uri` 891285, PDF, 339,517 bytes). That is the whole audit trail of a mandate, retrievable without a key.