TimesinkDB Living REST API Reference
The TimesinkDB REST API operates strictly over HTTPS (supporting both HTTP/1.1 and HTTP/2 multiplexed connections) and accepts schemaless JSON payloads. All data plane routes are database-scoped under /databases/{databaseId}/* with zero Data Definition Language (DDL) or schema migrations required.
Writes buffer in lock-free memory in sub-millisecond time. NVMe commits occur every 60s (or synchronously with ?requireCommit=true).
Replayed webhooks and cellular retries resolve at query time using monotonic Last-Write-Wins. Zero duplicate rows or index bloat.
Turnkey HTML widgets and SVG vector charts render server-side for $0.00 egress under fair use. Ideal for customer SaaS portals.
1. Regional Endpoints & Base URLs
TimesinkDB runs storage engines directly against local NVMe volumes within regional compute clusters. Each database is provisioned in a dedicated geographic cloud region for single-digit millisecond latency and clear data residency. Client applications direct requests to the regional base URL corresponding to their database location:
germanywestcentraleastus2japaneastwestus2, swedencentral, uksouth, southeastasia, australiaeast) with isolated host infrastructure, private VNet peering, and custom CNAME routing.
2. Authentication, Credentials & mTLS
TimesinkDB authenticates requests via Bearer tokens passed in the standard HTTP Authorization header (or query parameter for embeds), or via mutual TLS client certificates on dedicated mTLS hostnames:
sec_live_...) authenticate against the target database in the URL. Account-scoped keys (sec_acc_...) permit access to any database owned by the customer account. Use exclusively in secure backend runtimes.3. Telemetry Metering & Capacity Pooling
TimesinkDB charges $0.00 in write API fees (no HTTP transaction fees, indexing surcharges, or request units). Usage reflects pure tiered NVMe storage, outbound query egress, and parallel query workers:
Numeric telemetry is stored as fixed 16-byte records (8-byte timestamp + 8-byte IEEE 754 double) arranged in contiguous columnar pages. There is zero compression guesswork or block-rounding padding: 1 GB storage = exactly 62,500,000 points. Raw JSON events (?mode=blob) store an 8-byte timestamp + 4-byte length prefix + raw UTF-8 bytes (12 + N bytes).
| Sample Cadence | Points / Sensor / Day | Points / Sensor / Month (30d) | Storage / Sensor / Month | 100 Sensors / Month |
|---|---|---|---|---|
| 1 sample / 10 min | 144 | 4,320 | ~69 KB | ~6.9 MB |
| 1 sample / 1 min | 1,440 | 43,200 | ~691 KB | ~69.1 MB |
| 1 sample / 10 sec | 8,640 | 259,200 | ~4.15 MB | ~415 MB |
| 1 sample / 1 sec (1 Hz) | 86,400 | 2,592,000 | ~41.5 MB | ~4.15 GB |
| 10 samples / sec (10 Hz) | 864,000 | 25,920,000 | ~414.7 MB | ~41.5 GB |
4. Zero-Driver HTTP Client Snippets
Zero Dependencies
TimesinkDB operates over standard HTTPS with pure UTF-8 JSON. Standard fetch() or your favorite HTTP client is all you need:
const TSDB_URL = "https://fra1.timesinkdb.com/databases/42";
const TSDB_TOKEN = process.env.TIMESINKDB_KEY;
// 1. Ingest telemetry point
await fetch(`${TSDB_URL}/series/services.auth.latency_ms`, {
method: "POST",
headers: {
"Authorization": `Bearer ${TSDB_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ value: 14.8, route: "/login", status: 200 })
});
// 2. Query downsampled 1-hour average buckets
const res = await fetch(`${TSDB_URL}/query?seriesKey=services.auth.latency_ms&from=-24h&interval=1h&fn=avg`, {
headers: { "Authorization": `Bearer ${TSDB_TOKEN}` }
});
const { buckets } = await res.json();
import httpx
TSDB_URL = "https://fra1.timesinkdb.com/databases/42"
HEADERS = {"Authorization": "Bearer sec_live_..."}
with httpx.Client(base_url=TSDB_URL, headers=HEADERS) as client:
# 1. Ingest numeric telemetry
client.post("/series/fleet.vehicle_99.speed", json={
"speed_kmh": 104.2,
"battery_pct": 78.5
})
# 2. Query analytical aggregates
resp = client.get("/query", params={
"seriesKey": "fleet.vehicle_99.speed",
"from": "-6h",
"interval": "15m",
"fn": "avg"
})
print(resp.json())
using System.Net.Http.Json;
using var http = new HttpClient {
BaseAddress = new Uri("https://fra1.timesinkdb.com/databases/42/")
};
http.DefaultRequestHeaders.Authorization = new("Bearer", "sec_live_...");
// 1. Post telemetry point
await http.PostAsJsonAsync("series/iot.sensor_12.temperature", new {
celsius = 23.4,
humidity = 45.1
});
// 2. Query downsampled vector
var query = await http.GetFromJsonAsync<QueryResponse>(
"query?seriesKey=iot.sensor_12.temperature&from=-12h&interval=30m&fn=avg"
);
# 1. Ingest telemetry point
curl -X POST https://fra1.timesinkdb.com/databases/42/series/api.requests \
-H "Authorization: Bearer sec_live_..." \
-H "Content-Type: application/json" \
-d '{"duration_ms": 124.5, "status": 200}'
# 2. Query downsampled averages
curl -G https://fra1.timesinkdb.com/databases/42/query \
-H "Authorization: Bearer sec_live_..." \
--data-urlencode "seriesKey=api.requests" \
--data-urlencode "from=-24h" \
--data-urlencode "interval=15m" \
--data-urlencode "fn=avg"
Interactive API Request Simulator
Live Wire SandboxTest TimesinkDB HTTP requests directly in your browser. Inspect wire payloads, simulated response round-trips, and formatted JSON responses.
Authorization: Bearer sec_live_09f4b7a7019842a... Content-Type: application/json
[
{
"seriesKey": "fleet.sensor-a.temp",
"ts": 1788624900000,
"value": 42.8
},
{
"seriesKey": "fleet.sensor-b.speed",
"ts": 1788624900000,
"value": 88.5
}
]
content-type: application/json; charset=utf-8
{
"status": "accepted",
"ingestedBytes": 32,
"pointsIngested": 2
}
High-performance scoped ingestion endpoint supporting versatile structured extraction and raw event storage modes:
- extract (Default): Nested JSON numeric properties are flattened into dot-delimited columnar metric streams.
- blob: Stores the entire raw UTF-8 JSON payload verbatim as an immutable event record under the series key.
- blobArray: Treats the request body JSON array as multiple distinct blob events.
- both: Dual persistence. Flattens numeric fields while preserving raw JSON payload verbatim.
- bothArray: Applies dual persistence across each item in a JSON array.
| Parameter | In | Type | Description |
|---|---|---|---|
| databaseId | Path | integer | Unique database identifier (e.g. 42). |
| seriesKey | Path | string | Destination series key or namespace prefix up to 256 characters. Dots represent hierarchy. |
| mode | Query | string | Ingestion mode: extract (default), blob, blobArray, both, or bothArray. |
| requireCommit | Query | boolean | Optional (Pro+). When true, commits data synchronously to persistent NVMe before returning HTTP 200 OK (Zero RPO). Default is 202 Accepted. |
{
"ts": "2026-09-05T19:15:00.000Z",
"usage": 84.2,
"core": {
"temp": 68.4,
"frequency": 3400
}
}
{
"status": "accepted",
"ingestedBytes": 48,
"pointsIngested": 3
}
High-throughput batch ingest endpoint for dispatchers, edge aggregators, and proxy workers. Accepts a top-level JSON array of envelope items without artificial object wrappers (up to 5,000 items per request).
[
{
"seriesKey": "fleet.sensor-a",
"ts": 1788624900000,
"value": { "temp": 21.8, "humidity": 45.2 }
},
{
"seriesKey": "fleet.sensor-b",
"ts": "2026-09-08T00:15:00Z",
"value": { "temp": 23.1, "pressure": 101.3 }
}
]
{
"status": "accepted",
"ingestedBytes": 64,
"pointsIngested": 4
}
Series Keys, Escaping & Transport Safety
TimesinkDB guarantees that telemetry ingestion always succeeds as long as the payload is valid JSON. Upstream systems (IoT firmware, Kubernetes exporters, Stripe webhooks) never face rejection due to unconventional property naming.
In extract mode, unescaped dots (.) represent object depth hierarchy. Literal dots within property keys are escaped deterministically:
{"server": {"cpu": 80}} → server.cpu{"network": {"eth0.1": 100}} → network.eth0\.1Characters outside the standard metric set are preserved verbatim in the series catalog up to 256 characters:
{"disk/sda1": 45.2} → disk/sda1{"sensors": {"room temp": 21.0}} → sensors.room tempTurnkey webhook adapter that accepts raw HTTP webhook deliveries directly from third-party platforms (Stripe, GitHub, Shopify, Clerk) with zero intermediate glue code, lambdas, or queues. TimesinkDB verifies HMAC signatures at the edge and handles duplicate deliveries via monotonic Last-Write-Wins deduplication.
Lists registered series keys and their assigned storage types for the database, or retrieves specific series data directly via the key query parameter.
{
"count": 2,
"maxSeries": 65000,
"series": [
{ "seriesKey": "fleet.sensor-a.temp", "type": "numeric" },
{ "seriesKey": "fleet.audit.logs", "type": "blob" }
]
}
Canonical endpoint for retrieving time-series data and multi-representation projections. Automatically distinguishes between instant constant-time latest point lookups and temporal range queries based on parameter presence:
- O(1) Latest Point Retrieval (Default when
fromis omitted): Returns the most recent point in sub-millisecond time. - Chronological Range Query (When
fromis specified): Streams historical records over the specified time range. - Multi-Representation Projections: Append an extension (
.svg,.html,.csv,.json) to render directly.
{
"seriesKey": "fleet.sensor-a.temp",
"type": "numeric",
"ts": 1788624900000,
"value": 21.8
}
{
"seriesKey": "fleet.sensor-a.temp",
"count": 2,
"points": [
{ "ts": 1788624900000, "value": 21.8 },
{ "ts": 1788621300000, "value": 21.2 }
]
}
Executes hardware-accelerated downsampling, multi-series joins, and mathematical expressions across raw points. Deduplication is resolved dynamically over matching series chunks.
{
"range": { "from": "-1h", "to": "now" },
"interval": "15m",
"queries": [
{
"id": "q1",
"seriesKey": "fleet.*.temp",
"field": "celsius",
"fn": "avg"
}
]
}
{
"interval": "15m",
"timestamps": [
1788620400000,
1788621300000
],
"results": {
"q1": {
"values": [23.4, 24.1]
}
}
}
GET /databases/42/query?seriesKey=fleet.*.temp&from=-1h&to=now&interval=15m&fn=avg
Analytical queries can be projected directly into turnkey interactive visualizations or tabular export streams for Notion, GitHub READMEs, internal admin dashboards, and spreadsheet workflows.
| Extension | Content-Type | Description |
|---|---|---|
| .svg | image/svg+xml | Clean vector line chart. Parameters: from, interval, theme, token. |
| .html | text/html | Turnkey responsive HTML iframe widget with hover tooltips and dynamic metric stats. |
| .csv | text/csv | RFC 4180 comma-separated values stream for spreadsheet import. |
| .json | application/json | Standard structured downsampling result. |
Inspects (GET) or configures (PUT) granular retention lifetimes per series pattern at day granularity (e.g. 30d, 365d). Default infinite retention preserves data until manually purged. Rules run daily in the background and apply retroactively without locks.
{
"rules": [
{ "pattern": "fleet.ephemeral.*", "retention": "30d" },
{ "pattern": "fleet.audit.*", "retention": "365d" }
]
}
Database Provisioning & Management Portal
Database lifecycle management, capacity partitioning, and API key generation are coordinated by the central TimesinkDB control plane.
Database Partition Credentials & Connectivity
Every TimesinkDB database operates as an isolated physical partition with dedicated NVMe storage and compute workers. To interact with the data plane REST API, you need three values:
curl -i https://fra1.timesinkdb.com/ping
During the active prelaunch phase, databases and API keys are provisioned directly upon waitlist reservation or by emailing support@timesinkdb.com with your chosen region (fra1 Frankfurt, iad1 Virginia, or nrt1 Tokyo). Automated 1-click self-serve web management launches with general commercial availability in October 2026.
Engine Invariants & Enforced Limits
Hardware-enforced guardrails and architectural boundaries designed to guarantee deterministic single-digit millisecond latency:
| Boundary | Limit | Behavior When Exceeded |
|---|---|---|
| Max Single Write Payload | 10 MB | Rejects immediately with HTTP 413 PayloadTooLarge. |
| Batch Ingest Envelope Limit | 5,000 items | Capped at 5,000 items per batch HTTP POST (/ingest). |
| SIMD Query Scan Chunks | 65,536 pts (1 MB) | Decoupled async I/O enables scans of millions of points without RAM spikes. |
| Series Catalog Quota | 65,000 series | Points and events appended to each named series are unlimited up to provisioned storage capacity. |
| JSON Decomposition Depth | 5 levels | Flattens up to 5 nested levels into metric streams; deeper levels remain raw JSON events. |
| Query Execution Timeout | 4,000 ms | Analytical scans exceeding 4.0 seconds return HTTP 408 QueryTimeoutExceeded. |
| Storage Quota Cap (Spend Cap) | 100% Provisioned | Default Strict Spend Cap rejects writes with 422 StorageQuotaExceeded (alerts at 80% & 90%). Read queries continue with 0% downtime. |
Plan Architectural Tiers & Technical Capabilities
Technical comparison of concurrency gates, persistence modes, network isolation, and feature availability. For commercial pricing, refer to the Pricing Catalog.
| Technical Dimension | Free Sandbox | Starter | Pro | Scale | Dedicated Node |
|---|---|---|---|---|---|
| Database Topology | 1 Sandbox DB (Shared) | 1 Dedicated DB | Multi-DB (Up to 6 DBs) | Multi-DB (Up to 12 DBs) | Multi-DB (Unlimited DBs) |
| Account Concurrency Pool | 1 Query Worker | 4 Query Workers | 12 Query Workers | 24 Query Workers | Uncapped Concurrency |
| Ingestion Persistence | Async memory buffer (auto-flushed to disk every 60s) | Async memory buffer (auto-flushed to disk every 60s) | Async + Direct NVMe Commit (?requireCommit=true) |
Async + Direct NVMe Commit (?requireCommit=true) |
Async + Direct NVMe Commit (?requireCommit=true) |
| Authentication Schemes | Secret API Key, Read-Only Token | Secret API Key, Read-Only Token | API Key, Account Key, Read Token | API/Account Keys + Hardware mTLS Certs | API/Account Keys + Hardware mTLS Certs |
Visual Embeds (.html, .svg) |
Attributed ("Powered by") | Attributed ("Powered by") | Whitelabel (No watermark) + CSS Themes | Whitelabel + CSS Themes + Custom CNAME | Full Whitelabel + Custom Hostname |
Unauthenticated operational probes used by load balancers, container orchestrators, and latency checkers.
GET /healthz: Liveness probe returning200 OKif API host process is alive.GET /ready: Readiness probe returning200 OKif instance manager is ready to serve traffic (or503during shutdown).GET /ping: Minimal overhead latency ping returning plain textpong.
5. Error Codes & RFC 7807 Problem Details
All error responses follow the standard RFC 7807 problem details specification.
| Status Code | Name | Condition |
|---|---|---|
| 400 Bad Request | InvalidPayload | Payload failed JSON parsing or contained malformed series keys, data types, or intervals. |
| 401 Unauthorized | InvalidToken | Bearer secret token is missing, expired, or invalid. |
| 403 Forbidden | FeatureNotPermitted | Requested feature (e.g. requireCommit=true requires Pro+) is not permitted on this account plan tier, or a write operation was attempted using a scoped read-only token (tok_ro_...). |
| 404 Not Found | NotFound | The requested series key, webhook key, or administrative resource was not found. |
| 408 Request Timeout | QueryTimeoutExceeded | Analytical query took longer than the hard limit of 4.0 seconds. Shorten the range or increase the interval. |
| 413 Payload Too Large | InvalidPayload | Ingestion payload size exceeded 10 MB limit. |
| 422 Unprocessable | SeriesQuotaExceeded | Database exceeded maximum registered series quota (65,000 series per database). |
| 422 Unprocessable | StorageQuotaExceeded | Configured database reached 100% of provisioned storage under Strict Spend Cap mode. |
| 422 Unprocessable | TypeMismatch | Series data type conflicts with existing registered series schema. |
| 429 Too Many Requests | ConcurrencyLimitExceeded | Parallel query worker queue capacity was exceeded or timed out while awaiting an available query worker slot. Consider upgrading worker concurrency or optimizing query intervals. |