Batch-download Green Button Download My Data (DMD) ESPI XML files from a utility DataCustodian API without requiring customer OAuth authorization

domain: greenbuttonalliance.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Obtain bulk-access credentials from the utility's DataCustodian; for Download My Data (as opposed to Connect My Data), the utility provides a pre-authorized export — confirm whether access is via direct file download from a portal or via a DataCustodian API endpoint with a service account token.
  2. For API-based bulk download, authenticate using the service account OAuth 2.0 token (client_credentials grant against the DataCustodian's authorization endpoint); scope is typically 'FB=4_5_15_16_19_31_32_35_37_38_39_40_51' where FB codes correspond to ESPI function blocks.
  3. Request the bulk data at GET /DataCustodian/espi/1_1/resource/Batch/Subscription/{subscriptionID}/UsagePoint or the DataCustodian-specific bulk export URL; the response is an ESPI Atom feed (XML) containing one or more UsagePoint entries.
  4. Parse the ESPI Atom feed: each UsagePoint entry contains MeterReading children, each of which contains IntervalBlock children with IntervalReading elements; each IntervalReading has a timePeriod (start in Unix epoch, duration in seconds) and a value (in the unit specified by the ReadingType).
  5. Retrieve the ReadingType resource linked from each MeterReading to decode the commodity (electricity, gas), unit (Wh, therm), multiplier (PowerOfTenMultiplier), and accumulation behavior — do not assume all values are in Wh without checking the ReadingType.
  6. Handle pagination: large exports may return a next link in the Atom feed header — follow it iteratively and accumulate all IntervalBlock entries before processing; also handle partial-success responses where some UsagePoints return data and others return a fault entry.

Known gotchas

Related routes

Implement Green Button Connect (ESPI) OAuth flow and download interval energy data
greenbuttonalliance.org · 5 steps · unrated
Implement Green Button (ESPI) asynchronous notification callbacks so a DataCustodian pushes new usage data instead of being polled
greenbuttonalliance.org · 5 steps · unrated
Parse the Green Button/NAESB ESPI Atom+XML feed (UsagePoint, MeterReading, IntervalBlock, IntervalReading, ReadingType) returned after a Connect My Data authorization.
greenbuttonalliance.org · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans