Time Series Server

Local utility page for inspecting and exercising the data API.

Open FastAPI docs

Status / utilities

Current datapoint count: —

Manual datapoint creation

Current data preview

Latest ~10 datapoints (for quick API checks).

Loading…

API Guide

Timestamp format

Clients must provide an ISO-8601 timestamp with Z or an explicit timezone offset. The server normalizes to UTC and stores/returns:

2026-09-20T18:35:12.500Z

Omitting time is rejected. The server does not invent a timestamp.

POST /api/data

Create one datapoint.

{
  "time": "2026-09-20T18:35:12.500Z",
  "value": 12.34
}

Response includes the stored id, canonical time, and value.

GET /api/data

Return all datapoints (chronological: ORDER BY time ASC, id ASC) as:

{
  "count": 2,
  "data": [
    { "id": 1, "time": "...", "value": 10.2 }
  ]
}

Optional query filters (all ANDed; boundaries inclusive):

Examples:

/time-series/api/data?min_value=10&max_value=20
/time-series/api/data?start_time=2026-09-20T12:00:00Z&end_time=2026-09-20T14:00:00Z
/time-series/api/data?start_time=2026-09-20T12:00:00Z&end_time=2026-09-20T14:00:00Z&min_value=10&max_value=20

If start_time > end_time or min_value > max_value, the API returns HTTP 400.

DELETE /api/data

Delete all datapoints.

{
  "ok": true,
  "deleted_count": 123
}

POST /api/data/sample

Delete existing data, then create 200 deterministic one-minute sample points.

{
  "ok": true,
  "created_count": 200
}

Interactive docs

/time-series/docs