English | 中文
Dependency-free browser console that runs SQL against Apache IoTDB over its REST API (Tree REST v2 and Table REST v1) and exports the result set as CSV.
- One static page (
index.html,app.mjs,api.mjs,styles.css): no bundler, no server-side component, no runtime dependencies. - Statements starting with
SELECT,WITH,SHOW,DESCRIBE,DESC,EXPLAINorLIST(leading--and/* */comments are skipped) go to/rest/v2/queryor/rest/table/v1/query; every other statement goes to the matching/nonQueryendpoint. Table requests also senddatabase. - Tree responses are rebuilt from the parallel
expressions,timestampsandvaluesarrays, Table responses fromcolumn_namesandvalues; both render as a table with a row count and a CSV download of exactly the rows on screen. - Credentials travel as HTTP Basic on each request and are never persisted; the page writes nothing to local storage.
| IoTDB version | Data model | REST protocol | Runtime |
|---|---|---|---|
| 2.x | Tree | REST v2: /rest/v2/query, /rest/v2/nonQuery |
any browser with ES modules and fetch |
| 2.x | Table | REST v1: /rest/table/v1/query, /rest/table/v1/nonQuery |
any browser with ES modules and fetch |
Node.js 20 or newer is only needed for the tests (CI: 20.x, 22.x).
There is nothing to build. Serve the directory over HTTP, because ES modules and fetch do not work from a file:// page:
git clone https://github.com/iotdb-ecosystem/iotdb-rest-dashboard.git
cd iotdb-rest-dashboard
python3 -m http.server 8080Then open http://localhost:8080/. Any static HTTP server works; Python 3 is only the shortest example.
npm ci
npm testCI runs exactly npm ci and npm test on Node 20.x and 22.x. No IoTDB instance, no network and no dependencies are involved: the suite imports api.mjs and drives it with a stub fetch, covering route selection, query detection, both response shapes, Basic auth, transport failures and non-query statements.
| Field | Default | Notes |
|---|---|---|
| Protocol | http |
http or https |
| Host | - | hostname or IP; a leading http:///https:// and a trailing / are stripped |
| Port | 18080 |
IoTDB REST port |
| Model | tree |
tree (REST v2) or table (REST v1) |
| Username | - | optional; sent with the password as HTTP Basic |
| Password | - | optional |
| Database | - | Table model only, sent as database in the request body |
The endpoint has to accept cross-origin requests from the page origin, because the console posts straight from the browser.
- Serve the page and open it.
- Fill in host, port and model.
- Run a statement:
SHOW DATABASES;
SELECT * FROM root.factory.room LIMIT 20;Independent project. Maintained here; contributions and adoption inquiries are welcome.
Apache-2.0, see LICENSE.