Skip to Content
AdvancedAPI Reference

Transport & Endpoints

The Dart SDK is a high-level wrapper over the same public endpoints described in the API reference.

SQL execution (HTTP)

query(...) executes SQL over the HTTP SQL endpoint.

The SDK passes params as JSON (for $1, $2, … placeholders).

Related auth endpoints used by the SDK:

  • login(...) → POST /v1/api/auth/login
  • refreshToken(...) → POST /v1/api/auth/refresh
  • exchangeOidcToken(...) → POST /v1/api/auth/oidc/exchange-token

FILE download helpers use the shared KalamDB file endpoint:

MethodEndpointDart helpers
GET/v1/files/{namespace}/{table}/{sub}/{stored_name}KalamFileRef.getDownloadUrl(...), KalamCellValue.asFileUrl(...)

The last path segment is the stored filename generated by the shared link-common FileRef model. It is not the raw file id by itself.

For user tables, these helpers generate owner-scoped URLs. A regular user can download only their own files; service tokens can write through authorized EXECUTE AS USER flows, but direct cross-user FILE byte downloads require a dba or system token with an authorized user_id query parameter.

Live subscriptions (WebSocket)

live(), liveTable(), and liveEvents() use the WebSocket realtime endpoint.

On native Dart and Flutter targets, the shared subscription connection defaults The 0.8 client uses the shared KDOM binary codec. Legacy MessagePack connections are rejected; keep the SDK and server on the same release cohort.

Debugging compression

By default, the server may send gzip-compressed frames. For local debugging, disable compression:

DART
final client = await KalamClient.connect(  url: 'http://localhost:2900',  authProvider: () async => Auth.jwt(await getJwt()),  disableCompression: true,);

This appends ?compress=false to the WS URL so you can more easily inspect frames.

Do not enable in production. Compression reduces bandwidth and improves performance.

Timeouts and retries

  • timeout controls HTTP request timeout for queries.
  • maxRetries controls retry count for idempotent queries (typically SELECT).
DART
final client = await KalamClient.connect(  url: 'http://localhost:2900',  authProvider: () async => Auth.jwt(await getJwt()),  timeout: const Duration(seconds: 10),  maxRetries: 2,);

Next