/v1/streamStream 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
| Name | In | Required | Type and constraints |
|---|---|---|---|
series | query | yes | stringformat: uuid |
Request body
This operation has no request body.
Responses
101WebSocket upgrade
No response body.
400Missing or malformed series UUID query
text/plain
string401Authentication required
application/json
ErrorEnvelope
codestringrequiredcorrelation_idstringrequired- format: uuid
detailsobjectoptionalerrorstringrequired
Example 401 output
{
"error": "string",
"code": "account-sealed",
"correlation_id": "00000000-0000-4000-8000-000000000001"
}403Read capability is not granted
application/json
ErrorEnvelope
codestringrequiredcorrelation_idstringrequired- format: uuid
detailsobjectoptionalerrorstringrequired
Example 403 output
{
"error": "string",
"code": "account-sealed",
"correlation_id": "00000000-0000-4000-8000-000000000001"
}426WebSocket upgrade headers are required
text/plain
stringCode 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));
});Related topics
- Streaming guide — Understand the prerequisite concepts and transport behavior for this operation.
- REST endpoint index — Find other operations in Streaming.