Home / Docs
Docs

Ostwerk Core v2.7

Everything below is live in production today. Versioned, changelogged, and boring to upgrade.

Quickstart: read a stream

curl -s https://api.ostwerk-io.example.com/v2/streams \
  -H "Authorization: Bearer $OSTWERK_TOKEN" \
  -d '{"line":"A2","window":"5m"}' | jq '.series[0].stats

Python client

from ostwerk import Client
c = Client("plant-a2.local", token="...")
for s in c.streams.filter(machine="press.03"):
    print(s.id, s.quality, s.rate_hz)

Define an actuation rule

POST /v2/rules
{
  "entity": "press.03.force",
  "condition": { "op": "outside", "band": [18.5, 24.0] },
  "for": "30s",
  "action": { "kind": "webhook", "url": "https://ops.internal.example.com/hooks/press" },
  "context": ["order", "batch", "shift"]
}

Reference sections

SectionContents
Entities & schemaTyping, units, quality model, schema drift handling
CollectorsPer-protocol setup, buffering, store-and-forward
Query API v2Streams, windows, aggregates, pagination
Rules engineConditions, stateful windows, actions, replay
OperationsUpgrades, backups, multi-site, monitoring hooks