pages/apidocs.php
Snapshot 2026.09.17-a2894de (current) · 15 lines · 1,554 bytes · tree · plain text
SHA-256
78e7451b8aa1f7e9eae771d53203d7a93ace53c88f76954b7b20cba345195004| 1 | <?php |
| 2 | require_once __DIR__.'/../inc/layout.php'; |
| 3 | page_header('API','apidocs'); |
| 4 | echo '<h1>Data API</h1><p class="lede">Keyed, read-only JSON API for researchers and students. Keys are issued freely: email <a href="mailto:'.h(CONTACT_EMAIL).'?subject=Research%20Labs%20API%20key%20request">'.h(CONTACT_EMAIL).'</a>; the key exists for rate-limiting and abuse control, not gatekeeping. Hidden and embargoed streams are never served.</p>'; |
| 5 | echo '<div class="card"><h3>Endpoints</h3><table class="data">'; |
| 6 | $rows=[['GET /api.php?action=streams&key=…','All visible streams with instrument, unit, mode, cadence'], |
| 7 | ['GET /api.php?action=readings&stream=CODE&from=YYYY-MM-DD&to=YYYY-MM-DD&key=…','Time series (aggregate cadence); placeholder rows excluded once a stream is live; response carries data_mode'], |
| 8 | ['GET /api.php?action=events&class=fault&key=…','Public fault/gap/correction log'], |
| 9 | ['GET /api.php?action=checksums&path=…&key=…','Raw-file checksum verification']]; |
| 10 | foreach($rows as [$a,$b]) echo '<tr><td style="font-family:monospace;font-size:11.5px">'.h($a).'</td><td>'.h($b).'</td></tr>'; |
| 11 | echo '</table></div>'; |
| 12 | echo '<div class="card"><h3>Envelope</h3><p class="kv">Every response: {"ok":true,"data_mode":"live|placeholder|mixed","licence":"open data licence, attribution required","citation":"Districthive Research Labs, The Skerðingsstaðir Experiment","data":[…]}</p></div>'; |
| 13 | echo '<p class="note">Bulk raw archives are shipped on request rather than streamed. Write access does not exist on this surface at all.</p>'; |
| 14 | page_footer(); |
| 15 | |
Lines can be cited as pages/apidocs.php L120-L140, platform code 2026.09.17-a2894de; add #L120-L140 to this page's address to highlight them. Source shown for scrutiny of the research platform. All rights reserved. Not offered as installable software.