OrdinateDB

Documentation

product Pre-releaseunwritten sections are marked
GET/v1/stream

Stream live series updates over WebSocket

operation ID: get_v1_stream

Overview

Stream live series updates over WebSocket. The series WebSocket sends live point and gap updates for one directly addressed series.

When to use it

  • Use it when an application needs to stream live series updates over WebSocket.
  • Use it when a live dashboard needs new series updates without repeatedly polling the HTTP read endpoints.

Quick example

Set the base URL and replace generated identifiers or credentials with values from your installation.

cURL

curl --request GET \
  --url "$ORDINATE_URL/v1/stream?series=00000000-0000-4000-8000-000000000001" \
  --header "Authorization: Bearer $ORDINATE_TOKEN"

The cURL request supplies the documented path and query values and asks OrdinateDB to stream live series updates over WebSocket. The response status and body follow the Reference section below.

How it works

Authorization and the selected series are fixed when the WebSocket opens. The stream is best-effort, so durable reads remain the recovery path.

Reference

Required capability
read
Authorization scope
held anywhere

Parameters

NameInRequiredType and constraints
seriesqueryyes
stringformat: uuid

Request body

This operation has no request body.

Responses

101WebSocket upgrade

No response body.

400Missing or malformed series UUID query

text/plain

string
401Authentication required

application/json

ErrorEnvelope
codestringrequired
correlation_idstringrequired
format: uuid
detailsobjectoptional
errorstringrequired

Example 401 output

{
  "error": "string",
  "code": "account-sealed",
  "correlation_id": "00000000-0000-4000-8000-000000000001"
}
403Read capability is not granted

application/json

ErrorEnvelope
codestringrequired
correlation_idstringrequired
format: uuid
detailsobjectoptional
errorstringrequired

Example 403 output

{
  "error": "string",
  "code": "account-sealed",
  "correlation_id": "00000000-0000-4000-8000-000000000001"
}
426WebSocket upgrade headers are required

text/plain

string

Code examples

These examples are generated from the source contract. Replace the base URL, credentials, identifiers, and minimal generated values for your instance.

JavaScript

const ordinateUrl = "http://localhost:8080";
const url = new URL("/v1/stream?series=00000000-0000-4000-8000-000000000001", ordinateUrl);
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";

// Browser WebSockets use the existing same-origin session cookie.
const socket = new WebSocket(url);
socket.addEventListener("message", (event) => {
  console.log(JSON.parse(event.data));
});