Beta. STARCO Dev works with synthetic data only: do not send real personal or health data. Every feature shows its real status (Available Beta Beta · in development Coming).

Documentation menu

Example 01

A device twin: series and daily totals.

A wristband sends step counts several times a day. Keep every reading as a point of the series, then read the week as one total per day, with the days without data left empty.

time 3 minuses twins · series append · series range with buckets Betadata synthetic
Beta.The API this program calls is in beta and works with synthetic data only. The program is complete: with a project key in STARCO_KEY it runs as it is. The TypeScript and CLI tabs use the SDK and the command line, which are not published yet.

The idea#

The series keeps each point at the time it refers to. Reading it with bucket=1d&agg=sum groups the points by UTC day; fill=null returns the empty days too, as null with n: 0, so a chart never draws a zero that nobody measured.

The whole program#

export API="https://api.starco.dev/v1"
AUTH="Authorization: Bearer $STARCO_KEY"
JSON="Content-Type: application/json"
TWIN=$(curl -s -X POST "$API/twins" -H "$AUTH" -H "$JSON" \
  -d '{"template": "daily_movement", "layers": ["wellness"], "label": "wristband-01"}' | jq -r .twin.id)
curl -s -X POST "$API/twins/$TWIN/series/wellness.steps" -H "$AUTH" -H "$JSON" -d '{"points": [
  {"t": "2026-11-14T09:00:00Z", "v": 2100}, {"t": "2026-11-14T21:00:00Z", "v": 5320},
  {"t": "2026-11-16T21:00:00Z", "v": 9130}, {"t": "2026-11-17T21:00:00Z", "v": 6890}]}' | jq -c '{accepted, rejected}'
curl -s "$API/twins/$TWIN/series/wellness.steps?from=2026-11-14T00:00:00Z&to=2026-11-18T00:00:00Z&bucket=1d&agg=sum&fill=null" \
  -H "$AUTH" | jq -r '.points[] | "\(.t[:10]) \(.v) \(.n)"'
Output of the curl tabillustrative · synthetic
{"accepted":4,"rejected":[]}
2026-11-14 7420 2
2026-11-15 null 0
2026-11-16 9130 1
2026-11-17 6890 1

The other tabs print the same facts in their own format. Ids, hashes and counts depend on your project.

What just happened

Four readings became four points. The read grouped them into four UTC days: the 14th adds its two readings, the 15th has none and says so with null and n 0.

Go further#