Developers / Build / Features & data streams
Features & data streams
Hourly topic sessions, source aggregates and resumable server-sent events from the Hub implementation.
Paths, headers and fields mirror The IDIA Hub's Protocol API implementation, checked November 7, 2026. Keys and credit rates are issued per organization inside the Hub; source review is not an independent production assessment.
Topics and source boundaries
Source reviewed: Hub 7c30baa8, November 7, 2026. These are source aggregates, not raw contributor records or a guarantee of truthful, anonymous or on-chain-verified data. Health aggregation requires the latest feature_feed_health consent to be granted and a provenance-linked staged record. Financial and identity packets are limited to the requesting owner.
| Field | Type / presence | Meaning |
|---|---|---|
| vault_health_sync | Shared aggregate | Counts suppressed below 10 contributors; minimum_cohort: 10, suppressed: true; counts are null. |
| vault_financial_ledger | Owner aggregate | Settled entries, net_credits, usage_credits and currency: CRD. |
| vault_identity_stream | Owner aggregate | recorded_receipts and confirmed_liability_nfts; confirmation requires mint flag, token ID and mint transaction hash. |
POST /v1/features/sessions
Required topic query parameter; no request body. Authenticate using an active IDIA API key or a signed-in Hub bearer session. Starting a session atomically creates a one-hour access record and debits the owner ledger. Repeating while that owner/topic has an unexpired session returns reused: true without a second debit or extending expiry. No automatic renewal. A failed initial packet publication can follow a committed session; check a retry for reused rather than assuming no debit.
| Tier | Rate | Gate |
|---|---|---|
| Analyst | 5 CR / topic hour | Active subscription required |
| Professional | 15 CR / topic hour | Active subscription required |
| Enterprise / Pure Alpha | 50 CR / topic hour | Active subscription required |
| Free / expired subscription | 403 tier_required | No new paid session |
curl -X POST "https://zxyngqciipcvveigrzqt.supabase.co/functions/v1/protocol-api/v1/features/sessions?topic=vault_health_sync" \
-H "x-api-key: $IDIA_API_KEY" \
-H "X-IDIA-Environment: sandbox"GET /v1/features/latest
Requires topic and an unexpired owner/topic session in production. Returns topic, session_id, expires_at and packets (zero or one latest packet). Each packet contains id, payload and created_at. Publisher emits only when aggregate metrics change; lack of new packets is not an error. Packets older than seven days are pruned by the publisher; replay is bounded by retained data, not a guaranteed complete history.
GET /v1/features/stream
Production returns text/event-stream for at most 45 seconds. Reconnect with the last successfully processed packet ID: Last-Event-ID takes precedence over cursor. IDs are decimal strings matching 0 or 1–18 digits without leading zeros. They are not receipt-history Base64url cursors. Without a cursor, the latest packet is sent first; with a cursor, retained packets with greater IDs are replayed in ascending order, up to 100 per poll.
The stream advertises retry: 3000, sends comment heartbeats, polls about every two seconds and rechecks authentication and session validity every ten seconds. X-IDIA-Session-Expires gives the session expiry. Reconnect after ordinary window closure, but do not automatically buy another session on expiry. Persist the cursor only after durable processing; deduplicate by topic and packet ID. A browser EventSource cannot set the x-api-key header: proxy through your server, never put the key in a URL.
| Field | Type / presence | Meaning |
|---|---|---|
| feature.batch_ready | SSE event | id is packet ID; data is packet.payload, not the webhook envelope. |
| session.expired | SSE event | data.code: session_expired_or_revoked; stop and reassess access. |
| stream.error | SSE event | data.code: stream_interrupted; reconnect with the saved cursor and bounded backoff. |
# Production read: requires an already-paid, unexpired session.
curl -N --get "https://zxyngqciipcvveigrzqt.supabase.co/functions/v1/protocol-api/v1/features/stream" \
-H "x-api-key: $IDIA_API_KEY" \
-H "Last-Event-ID: $LAST_PACKET_ID" \
--data-urlencode "topic=vault_health_sync"Feature sandbox
X-IDIA-Environment: sandbox returns 200 application/json for all three feature routes: empty packets, zero deduction and no paid session. Authentication, topic validation, method checks and rate limiting still apply. Sandbox streaming is JSON, not SSE; it cannot prove production replay, expiry or delivery behavior.