Typed Attributes API
Typed attributes are the structured / numeric data source the engine reasons over for range queries, thresholds, and trajectories — instead of opaque metadata JSON. Numeric and anomaly predictions read from here.
All routes are under /api/v1/projects/{projectId}/memory-typed.
Attribute definitions
Register the schema of an attribute — its type and plausibility range. This drives input validation on ingest.
POST /memory-typed/attributes
{
"attributeKey": "order_total",
"dataType": "numeric",
"unit": "usd",
"minValid": 0,
"maxValid": 100000,
"required": false
}dataType is numeric | categorical | temporal | boolean.
GET /memory-typed/attributes lists the registered definitions (optional
attributeKey, limit, offset).
Observations
Ingest typed measurements. Each row is validated against its attribute definition — accepted or quarantined — and accepted numeric values are folded into per-subject running accumulators.
POST /memory-typed/observations (synchronous, returns the report)
{
"observations": [
{
"attributeKey": "order_total",
"subjectKind": "customer",
"subjectExternalId": "acct-42",
"valueNumeric": 48.5,
"observedAt": "2026-07-12T18:03:00Z",
"source": "pos"
}
]
}Exactly one value* field is meaningful per the attribute’s dataType
(valueNumeric / valueText / valueBool / valueTs).
Response — the ingest report:
{ "accepted": 1, "quarantined": 0, "duplicates": 0, "quarantineReasons": {} }For high volume, POST /memory-typed/observations/enqueue queues the batch and
returns 202 { "enqueued": N }.
GET /memory-typed/observations queries raw observations by subject, attribute,
time window (since / until), numeric range (minValue / maxValue), and
status.
Accepted numeric observations also emit a typed.observation event, so
memory-value alert rules can fire on them. See
Events & Alerts.
Accumulator
GET /memory-typed/accumulator?subjectKind=…&subjectExternalId=…&attributeKey=…
Read the running statistics for one subject + attribute:
{
"subjectKind": "customer",
"subjectExternalId": "acct-42",
"attributeKey": "order_total",
"count": 12,
"sum": 583.4,
"min": 12.0, "max": 92.5, "last": 48.5,
"cumulative": 583.4,
"mean": 48.6, "variance": 410.2, "stddev": 20.3,
"ewma": 45.1
}mean / variance / stddev are derived on read from the stored moments;
ewma is the exponentially-weighted moving average that anomaly detection uses
as a baseline.
Metering
Typed observations count against the events-ingested meter and are gated by that entitlement.