Register a datasource
Connect your database. The body’s distinguishing field selects the kind: connectionString (direct) or endpoint + signingKey (signed endpoint). Requires a secret key; the org comes from the key, never the body.
Authorizations
API key (sk_live_…) or a scoped capability token. The same header carries both — the server discriminates by token shape.
Body
- Direct (connection string)
- Signed endpoint
Register your Postgres by connection string — what Ablo({ databaseUrl }) calls. Sent once over TLS, stored sealed, never returned. The calling key's mode picks the environment (an sk_test_ key registers your sandbox data plane).
Response
The registered datasource (safe projection — no credential).
A database connection registered for the caller's org. connection discriminates the kind; credentials never appear (no field exists for them).
datasource Typed id: ds_… (direct, live), ds_test_… (direct, sandbox), dse_… (endpoint).
direct, endpoint unverified, active, rejected Unix seconds.
Direct kind only.
postgresql Direct kind only — safe to display.
Direct kind only.
Direct kind only — Postgres schema of the synced tables.
Direct kind only — credential-free summary.
Endpoint kind only.
test, live Endpoint kind only — the signed HTTPS endpoint URL.
Endpoint kind only — last 4 chars of the signing key.
Endpoint kind only — event-feed cursor.
Endpoint kind only.
Endpoint kind only.
Endpoint kind only — Unix seconds.
Endpoint kind only — Unix seconds.
Endpoint kind only.