/v1/read/subscribeSubscribe to resolved live updates over SSE
operation ID: post_v1_read_subscribe
Overview
Subscribe to resolved live updates over SSE. Resolved reads turn model selectors into time-series results while preserving binding history, quality, gaps, and provenance.
When to use it
- Use it when an application needs to subscribe to resolved live updates over SSE.
- Use it when a chart, report, analysis, or live view needs model-aware values rather than direct storage rows.
Quick example
Set the base URL and replace generated identifiers or credentials with values from your installation.
cURL
curl --request POST \
--url "$ORDINATE_URL/v1/read/subscribe" \
--header "Authorization: Bearer $ORDINATE_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"resolve": {
"select": {
"kind": "attributes_named",
"content": {
"name": "string"
}
},
"scope": {}
}
}'Expected output · 200
SSE events: resolved, frame, gap, and lagged
The response uses the documented non-JSON media type.
The cURL request sends the smallest contract-derived body and asks OrdinateDB to subscribe to resolved live updates over SSE. The documented 200 response is sSE events: resolved, frame, gap, and lagged.
How it works
The server resolves requested attributes through their time-bounded series bindings, reads the applicable data, then returns the requested representation.
Reference
- Required capability
- read
- Authorization scope
- each resolved result
Parameters
No parameters.
Request body
application/json
include_snapshotbooleanoptionalresolveobjectrequired- unknown fields rejected
as_of_nsany ofoptionalany of
option 1
integerUTC Unix timestamp in nanoseconds
format: int64option 2
nullinclude_retiredbooleanoptionalrangeany ofoptionalany of
option 1
array · min 2 · max 2
item 1integerUTC Unix timestamp in nanoseconds
format: int64item 2integerUTC Unix timestamp in nanoseconds
format: int64option 2
nullscopeobjectrequired- unknown fields rejected
downstream_ofany ofoptionalany of
option 1
assetstringrequired- format: uuid
depthintegeroptional- minimum: 0
viaarrayrequiredarray
string
option 2
nulltemplateany ofoptionalany of
option 1
one of
option 1
contentstringrequired- format: uuid
kindstringrequired
option 2
contentstringrequiredkindstringrequired
option 2
nullunderany ofoptionalany of
option 1
one of
option 1
contentstringrequiredkindstringrequired
option 2
contentstringrequired- format: uuid
kindstringrequired
option 2
nullupstream_ofany ofoptionalany of
option 1
assetstringrequired- format: uuid
depthintegeroptional- minimum: 0
viaarrayrequiredarray
string
option 2
null
selectone ofrequiredone of
option 1
contentobjectrequired- unknown fields rejected
namestringrequired
kindstringrequired
option 2
contentarrayrequiredarray
stringformat: uuidkindstringrequired
option 3
kindstringrequired
timestamp_formatstringoptional
Example request body
{
"resolve": {
"select": {
"kind": "attributes_named",
"content": {
"name": "string"
}
},
"scope": {}
}
}Responses
200SSE events: resolved, frame, gap, and lagged
text/event-stream
string400Invalid read request
application/json
ErrorEnvelope
codestringrequiredcorrelation_idstringrequired- format: uuid
detailsobjectoptionalerrorstringrequired
Example 400 output
{
"error": "string",
"code": "account-sealed",
"correlation_id": "00000000-0000-4000-8000-000000000001"
}401Authentication 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"
}503Model database is not configured, unavailable, or render capacity is exhausted
application/json
ErrorEnvelope
codestringrequiredcorrelation_idstringrequired- format: uuid
detailsobjectoptionalerrorstringrequired
Example 503 output
{
"error": "string",
"code": "account-sealed",
"correlation_id": "00000000-0000-4000-8000-000000000001"
}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 token = "<bearer-token>";
const response = await fetch(`${ordinateUrl}/v1/read/subscribe`, {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"resolve": {
"select": {
"kind": "attributes_named",
"content": {
"name": "string"
}
},
"scope": {}
}
})
});
if (!response.ok) {
throw new Error(`OrdinateDB returned ${response.status}: ${await response.text()}`);
}
const stream = response.body;
if (!stream) throw new Error("Response has no event stream");
console.log(stream);Related topics
- Wire conventions — Understand the prerequisite concepts and transport behavior for this operation.
- REST endpoint index — Find other operations in Reads.