2026-07-06 17:02:35 +03:00
2026-07-03 12:54:23 +05:00
2026-06-19 08:18:52 +03:00
2026-06-19 08:18:52 +03:00
2026-06-19 08:18:52 +03:00
2026-06-19 08:18:52 +03:00
2026-07-03 12:54:23 +05:00
2026-06-19 08:18:52 +03:00
2026-06-19 08:18:52 +03:00

drill-cloud-v3

Lightweight Drill Cloud API for an existing PostgreSQL/TimescaleDB database.

What is intentionally absent

  • No migrations.
  • No tag-translation module.
  • No alarm log writes.
  • No automatic edge or tag upserts during ingest.

Database

The current cloud database schema uses these public tables:

  • edge(id, name, parent_id, tag_ids)
  • tag(id, name, min, max, comment, unit_of_measurement, edge_ids, precision, tag_group)
  • current(id, edge, tag, value, createdAt, updatedAt)
  • history(id, edge, timestamp, tag, value, createdAt)

history is expected to be a TimescaleDB hypertable partitioned by timestamp. Historical chart ranges use continuous aggregates:

  • history_1m
  • history_5m
  • history_1h
  • history_1d

API

All routes are served under the /api prefix.

  • GET /api/health
  • GET /api/edge
  • GET /api/tag?edge=edge5&search=pressure
  • GET /api/current?edge=edge5&tags=tag1,tag2
  • GET /api/history?edge=edge5&tags=tag1,tag2&from=2026-06-01T00:00:00Z&to=2026-06-02T00:00:00Z
  • POST /api/ingest
  • POST /api/ingest/:edge

POST /api/ingest accepts one point:

{
  "edge": "edge5",
  "tag": "hook_weight_1",
  "timestamp": "2026-06-19T00:00:00Z",
  "value": 12.34
}

POST /api/ingest/:edge accepts a compact edge payload:

{
  "timestamp": "2026-06-19T00:00:00Z",
  "values": {
    "hook_weight_1": 12.34,
    "rotary_rpm": 80
  }
}

Local Run

npm install
cp .env.example .env
npm run start:dev

The default port is 3101.

Description
No description provided
Readme 325 KiB
Languages
TypeScript 97.5%
JavaScript 1.8%
Dockerfile 0.7%