HeliosDB Full API Reference
Reference for the WASM procedure SDK, the planned webhook and scheduler HTTP API, Prometheus metric names and the server configuration schema of HeliosDB Full.
WASM procedure SDKs
| Language | Published SDK |
|---|---|
| Go (TinyGo) | github.com/HeliosDatabase/HeliosDB-SDKs/sdks/go/wasm (below) |
| Python, JavaScript, Rust | None. The heliosdb Python module, the heliosdb JavaScript module and the heliosdb-wasm-sdk crate described in earlier versions of this page are not published. |
For application access to HeliosDB Full from these languages, use a PostgreSQL driver: see SDKs.
Go SDK API
Package: github.com/HeliosDatabase/HeliosDB-SDKs/sdks/go/wasm/heliosdb
Install with go get github.com/HeliosDatabase/HeliosDB-SDKs/sdks/go/wasm@latest
and build procedures with
tinygo build -target=wasm-unknown -gc=conservative -opt=z -no-debug -o procedure.wasm ..
Procedures are exported with //export and take and return WASM scalars.
The module imports only the host’s env functions (no WASI). Source and
examples: sdks/go/wasm.
SQL
| Function | Description |
|---|---|
Exec(sql string) (int64, error) | Run a statement and return the rows affected (heliosdb_execute) |
Quote(s), QuoteIdent(s), Int64(v) | Build SQL literals (the ABI has no bind parameters) |
Procedures cannot read query results. The host functions that return rows write them to a host-chosen address in the module’s memory, so the SDK does not expose them (see Host Functions).
Example:
import "github.com/HeliosDatabase/HeliosDB-SDKs/sdks/go/wasm/heliosdb"
//export deactivate_userfunc deactivateUser(id int64) int32 { if _, err := heliosdb.Exec("UPDATE users SET active = false WHERE id = " + heliosdb.Int64(id)); err != nil { heliosdb.LogError(err.Error()) return -1 } return 0}Transactions
| Function | Description |
|---|---|
Begin() (Tx, error) | Start a transaction |
Tx.Commit() error, Tx.Rollback() error | Finish it |
WithTx(fn func(Tx) error) error | Commit on success, roll back on error |
Key-value store and logging
| Function | Description |
|---|---|
StorageWrite(key string, value []byte) error | Write to the host key-value store |
Log(level, msg), LogTrace … LogError | Write to the server log |
Failed host calls return *heliosdb.HostError with the host’s return code.
Testing
github.com/HeliosDatabase/HeliosDB-SDKs/sdks/go/wasm/heliosdbtest provides an
in-memory host: fake := heliosdbtest.Install(t) records SQL, transactions,
logs and key-value writes so procedures can be tested with go test.
HTTP API
Webhook Management (planned)
POST /api/webhooks
Register new webhook.
Request:
{ "endpoint": "/github/push", "provider": "github", "secret": "webhook-secret", "function": "handle_github_push", "ip_whitelist": ["192.30.252.0/22"]}Response:
{ "id": "wh_123abc", "endpoint": "/github/push", "created_at": "2025-10-30T12:00:00Z"}GET /api/webhooks
List all webhooks.
Response:
{ "webhooks": [ { "id": "wh_123abc", "endpoint": "/github/push", "provider": "github", "enabled": true } ]}DELETE /api/webhooks/:id
Delete webhook.
Response: 204 No Content
Scheduler API (planned)
POST /api/jobs
Create cron job.
Request:
{ "name": "daily_cleanup", "cron": "0 2 * * *", "timezone": "America/New_York", "function": "daily_cleanup", "enabled": true}Response:
{ "id": "job_456def", "name": "daily_cleanup", "next_run": "2025-10-31T02:00:00-04:00"}GET /api/jobs
List all jobs.
Response:
{ "jobs": [ { "id": "job_456def", "name": "daily_cleanup", "cron": "0 2 * * *", "enabled": true, "last_run": "2025-10-30T02:00:00-04:00", "next_run": "2025-10-31T02:00:00-04:00" } ]}Prometheus Metrics
WASM Metrics
heliosdb_wasm_invocations_total{module, function, status}heliosdb_wasm_execution_duration_seconds{module, function}heliosdb_wasm_cache_hits_total{tier}heliosdb_wasm_pool_utilization{module}heliosdb_wasm_memory_bytes{module}Edge Function Metrics
heliosdb_edge_events_total{source, status}heliosdb_cdc_events_total{table, operation}heliosdb_webhook_requests_total{provider, status}heliosdb_cron_executions_total{job, status}Database Metrics
heliosdb_queries_total{status}heliosdb_query_duration_secondsheliosdb_connections_activeheliosdb_transactions_total{status}Configuration Reference
Complete Config Schema
[server]host = "0.0.0.0"port = 5432max_connections = 100
[wasm.cache]aot_enabled = trueaot_cache_dir = "/var/lib/heliosdb/wasm_cache"aot_max_size_gb = 5aot_max_age_days = 7
[wasm.pool]instance_pool_min_per_module = 5instance_pool_max_per_module = 20instance_pool_idle_timeout_secs = 300
[wasm.execution]default_timeout_ms = 5000default_memory_limit_mb = 16enable_fuel_metering = true
# Planned: [edge_functions] is not read by the current release[edge_functions]enabled = truecdc_enabled = truewebhook_server_enabled = truescheduler_enabled = true
[monitoring]prometheus_enabled = trueprometheus_port = 9090opentelemetry_enabled = trueThe [edge_functions] section (edge functions, CDC triggers, the webhook server
and the scheduler) is planned together with those features.