Skip to content

About

Dependency-free browser SQL console and CSV exporter for the Apache IoTDB REST API

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

IoTDB REST Dashboard

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.

CI

What it does

  • 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, EXPLAIN or LIST (leading -- and /* */ comments are skipped) go to /rest/v2/query or /rest/table/v1/query; every other statement goes to the matching /nonQuery endpoint. Table requests also send database.
  • Tree responses are rebuilt from the parallel expressions, timestamps and values arrays, Table responses from column_names and values; 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.

Compatibility

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).

Build

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 8080

Then open http://localhost:8080/. Any static HTTP server works; Python 3 is only the shortest example.

Test

npm ci
npm test

CI 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.

Configuration

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.

Usage

  1. Serve the page and open it.
  2. Fill in host, port and model.
  3. Run a statement:
SHOW DATABASES;
SELECT * FROM root.factory.room LIMIT 20;

Project status

Independent project. Maintained here; contributions and adoption inquiries are welcome.

License

Apache-2.0, see LICENSE.

About

Dependency-free browser SQL console and CSV exporter for the Apache IoTDB REST API

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages