Gyroscopic API
Build your own front-end. Tailfin is one front-end for Gyroscopic. It does not have to be the only one. Gyroscopic serves all its data over a plain HTTP API with JSON responses, and anyone may write a dashboard, a report, an alerting script, a mobile app or a whole new front-end on top of it. This is encouraged. Use any language and any framework, and run it on your own hosts.
What you may doConnectFrom a browserBasicsThe dataEndpointsLimitsA small scriptTest status
What you may do
Gyroscopic is free to use for individuals and companies, for any purpose, on any number of hosts. Software you write that uses this API (or the MCP interface) is your own: you choose how to build it and how to license it, and you may give it away or sell it. The license covers only the SolidFokus applications themselves. Using their documented interfaces is what they are for; it is not modifying or reverse engineering them. The SolidFokus binaries themselves may not be redistributed, so point your users to download.solidfokus.com rather than bundling them.
How Tailfin does it
Tailfin is a server-side front-end: the browser talks only to Tailfin, and Tailfin reads Gyroscopic over HTTP with the read secret (user tailfin). It uses /api/v1/tags, /api/v1/latest, /api/v1/oldest, /api/v1/sequence and /api/v1/status. Your front-end can use the same endpoints or the fleet views (overview, health, series, episodes).
AI assistants: MCP
Gyroscopic also has an MCP interface for AI assistants, on its own port (3101) with its own secret. It is not needed for a front-end. Setup: Install Gyroscopic, section 5.
Connect
Address. http://<host>:3000 by default; Gyroscopic listens on 127.0.0.1 unless the operator set network.listen_address. With network.tls on, use https://: for the self-signed certificate, trust that certificate file (for example curl --cacert) or pin its SHA-256 fingerprint (gyroscopic --tls-info prints it). The settings are on Gyroscopic configuration.
Authentication. HTTP Basic auth with fixed user names. The passwords are the secrets in the config file.
| Group | Endpoints | User | Password (config key) |
|---|---|---|---|
| Health | GET /health | none | never needs auth |
| Read | every other /api/v1/ path (GET and HEAD, and POST /api/v1/series) | tailfin | auth.tailfin_secret |
| Ingest | POST /api/v1/collect | tracerlight | auth.tracerlight_secret |
| MCP | the MCP port | mcp | auth.mcp_secret |
- A front-end uses user
tailfin. The name is historical: it is the read user for every front-end, not only for Tailfin. Ask the operator for the value ofauth.tailfin_secret. It can only read; it cannot write data. - Each secret protects only its own group. If the operator left
auth.tailfin_secretout of the config, the read endpoints need no auth. Do not rely on that; send the credentials anyway. - Wrong or missing credentials:
401withWWW-Authenticate: Basic realm="gyroscopic"and the plain-text bodyUnauthorized. With auth on, an unknown path under/api/v1/also answers 401 until the credentials are right; then it answers 404. - Over plain HTTP the password crosses the network readable. Off the host, use TLS (Gyroscopic's own, or NGINX in front).
- If the operator set an allow list (
network.allow), the host your front-end runs on must be in it; other addresses get no HTTP answer at all (the connection is closed). Behind a proxy, the proxy's address is the one that counts.
TAILFIN_SECRET='<value of auth.tailfin_secret>'
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/tags?type=both"
# self-signed TLS: trust Gyroscopic's certificate (Linux path; FreeBSD and OpenBSD: /var/db/gyroscopic/tls/cert.pem)
curl -s --cacert /var/lib/gyroscopic/tls/cert.pem -u "tailfin:$TAILFIN_SECRET" "https://localhost:3000/api/v1/overview?type=client"
From a browser
Gyroscopic sends no CORS headers, so a web page served from another address cannot call it from browser scripts. Never put the read secret into a web page either: anyone who can open the page can read it. There are three ways to build on the API:
- Your own backend (as Tailfin does): your server calls Gyroscopic with the read secret; the browser talks only to your server.
- A same-origin proxy: NGINX serves your front-end's files and passes
/api/v1/to Gyroscopic on the same address. NGINX adds the read secret, so browsers never see it. Protect the proxy itself (a login, an allow list, or an internal network only): anyone who reaches it can read the data. Example below. - Scripts and tools without a browser: call the API directly, with curl or any HTTP library (example).
NGINX same-origin proxy
Your front-end's files in /var/www/my-frontend, Gyroscopic on the same host at 127.0.0.1:3000. Everyone who opens the front-end logs in to NGINX with a user from /etc/nginx/dashboard.htpasswd (create one with printf 'alice:%s\n' "$(openssl passwd -apr1)" >> /etc/nginx/dashboard.htpasswd). Your page then calls relative URLs such as /api/v1/overview?type=client. Replace <BASE64> with the output of printf '%s' "tailfin:$TAILFIN_SECRET" | base64, and keep the file readable only by root and NGINX, since it holds the secret.
server {
listen 443 ssl;
server_name dashboard.example.net;
ssl_certificate /etc/ssl/dashboard/fullchain.pem;
ssl_certificate_key /etc/ssl/dashboard/privkey.pem;
# Everyone who opens the front-end logs in here (htpasswd file).
auth_basic "dashboard";
auth_basic_user_file /etc/nginx/dashboard.htpasswd;
# Your front-end: static files (HTML, CSS, scripts).
root /var/www/my-frontend;
location / {
try_files $uri $uri/ =404;
}
# Never let browsers write data.
location = /api/v1/collect {
return 403;
}
# Read API, same origin. NGINX adds the read secret; browsers never see it.
location /api/v1/ {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Authorization "Basic <BASE64>";
proxy_set_header Host $host;
proxy_read_timeout 30s;
}
}Tested with 1.12.6-bcd8897 on Debian 13 (box), 2026-11-27, with NGINX 1.26: this block with a test certificate, port and paths changed. A login was required (401 without it), the static page was served, GET and POST /api/v1/series reached Gyroscopic with the secret added by NGINX, and /api/v1/collect answered 403. On Linux put the file in /etc/nginx/conf.d/; on FreeBSD see option 2, section 10, for the path and the include line. TLS settings as on Install Gyroscopic, section 4. Not yet tested on a real host: Gyroscopic on another host behind this proxy.
Basics
- Stability. Nothing under
/api/v1/is removed or renamed: no endpoint, parameter or response field. New endpoints, parameters and fields can be added. Ignore fields you do not know, and do not depend on the order of keys in an object. - Format. Answers are JSON (
Content-Type: application/json), with these exceptions:/api/v1/semanticsis plain text; 401 is the plain textUnauthorized; a missing or malformed required parameter is a plain-text 400 such asFailed to deserialize query string: missing field `tag`; a body that is too large is a plain-text 413; an unknown path is an empty 404. Other errors are JSON:{"error":"..."}. Do not assume every error body is JSON. - Unknown tags are not errors. Reading a tag that does not exist (or no longer exists) returns 200 with an empty result:
{"records":[]},{}for status, or an empty list of rows. - Times are RFC 3339 in UTC with nanoseconds, from the sender's clock. Parameters
fromandtotake RFC 3339 too, for example2026-11-27T12:00:00Z. - Request IDs. Every response has an
x-request-idheader set by Gyroscopic (except the request-timeout 503; one it sends is ignored). Quote it when you report a problem. - Busy. Under load, or when a request runs longer than
network.request_timeout_secs(default 10 s), Gyroscopic answers 503, usually withRetry-After. Wait that long and try again. HEADworks whereverGETdoes.
Error examples (real output):
$ curl -s -i "http://127.0.0.1:3000/api/v1/tags?type=both"
HTTP/1.1 401 Unauthorized
www-authenticate: Basic realm="gyroscopic"
x-request-id: a21cdd4b46
content-length: 12
Unauthorized
$ curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/tags?type=foo"
{"error":"invalid type 'foo': must be 'client' or 'server'"}
$ curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/latest?tag=SITE1-SITE2&type=client&limit=999999999"
{"error":"limit 999999999 exceeds maximum 1000000 (configure endpoints.max_query_limit to raise)"}
The data
Each Tracerlight process sends one record per interval (1 s by default). Gyroscopic keeps them per tag and type: client records come from Tracerlight clients, server records from Tracerlight servers.
Client records
| Field | Meaning |
|---|---|
tag | Who sent it (see Tags below). |
timestamp | Sender clock, RFC 3339, nanoseconds. |
sequence | Gyroscopic's own counter for this tag, from 0. |
event | stats every interval; final once when Tracerlight stops. |
uptime_ms | Tracerlight uptime. |
sent, received, lost | Probe packets: counters. |
reordered, duplicated | Packets out of order or seen twice: counters. |
too_low, too_high | Too-low and too-high responses: counters. |
send_error, recv_error | Socket errors: counters. |
icmp_port_unreachable, icmp_host_unreachable, icmp_network_unreachable | ICMP errors received: counters. |
rtt_min_ns, rtt_avg_ns, rtt_max_ns | Round-trip time in this interval, ns: gauges. |
rtt_p50_ns, rtt_p90_ns, rtt_p95_ns, rtt_p99_ns | RTT percentile estimates for this interval, ns: gauges (0 = no data). |
Server records
| Field | Meaning |
|---|---|
tag, timestamp, sequence, event, uptime_ms | As for clients. |
packets_received, packets_sent | Probes answered: counters. |
invalid_key, decode_error | Probes with the wrong --key or that could not be decoded: counters. |
recv_error, send_error | Socket errors: counters. |
How to read them
- Counters are running totals since that Tracerlight process started. For "lost in the last minute", subtract two records; never add records up. If a counter goes down, Tracerlight restarted.
status,overview,healthandseriesdo this subtraction for you and skip restarts. - RTT fields are per interval. Do not add or average percentiles across records; show them as they are, or take the maximum.
- Loss in percent is lost ÷ sent over the same window (
loss_bpin/api/v1/healthis the same in basis points). - Tags. Up to 64 characters of letters, digits,
_and-. The usual convention: serversSITE_HOST, clientsLOCAL-REMOTE(the client and the server it probes). It is a convention, not a rule; Gyroscopic does not check it. - History. Gyroscopic keeps the newest
buffer_lengthrecords per tag in RAM (691,200 by default: 8 days at 1 s). A tag that sends nothing foridle_timeout(one day by default) is dropped. A Gyroscopic restart clears everything and sequence numbers start again from 0.
Endpoints
Examples assume TAILFIN_SECRET is set as in Connect, and use the tags SITE1-SITE2 and SITE3-SITE2 (clients) and SITE2_SRV1 (server). The outputs are real, from a test with a short burst of loss.
| Path | Use |
|---|---|
/health | Liveness and version (no auth) |
/api/v1/tags | Live tags |
/api/v1/latest | Newest records of a tag |
/api/v1/oldest | Oldest records still held |
/api/v1/dump | All records of a tag (can be turned off) |
/api/v1/sequence | Records by sequence number |
/api/v1/range | Records in a time window |
/api/v1/changes | Where a counter went up |
/api/v1/status | Counter totals for a tag |
/api/v1/snapshot | Status plus newest records |
/api/v1/overview | One row per tag, short window |
/api/v1/episodes | Loss, RTT and restart runs |
/api/v1/correlated | Which tags had trouble at the same time |
/api/v1/health | Tags with problems, worst first |
/api/v1/buckets | Coarse scan of the whole history |
/api/v1/series | Chart columns for many tags (GET or POST) |
/api/v1/semantics | What the data means (plain text) |
/api/v1/collect | Data in from Tracerlight (POST, not for front-ends) |
GET /health
Liveness and version. Never needs auth; use it for monitoring and to show the Gyroscopic version in your front-end. HEAD works too.
curl -s http://127.0.0.1:3000/healthResponse (real output, shortened where marked):
{
"status": "ok",
"version": "1.12.6-bcd8897"
}
GET /api/v1/tags
The live tags. A tag is live while Gyroscopic holds data for it; it goes away after idle_timeout without data, or when Gyroscopic restarts. The order of tags is not defined; sort them yourself.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
type | yes | client, server or both. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/tags?type=both"Response (real output, shortened where marked):
{
"client": {
"count": 2,
"tags": ["SITE3-SITE2", "SITE1-SITE2"]
},
"server": {
"count": 1,
"tags": ["SITE2_SRV1"]
}
}With type=client or type=server the shape is flat: {"count":2,"tags":["SITE3-SITE2","SITE1-SITE2"],"type":"client"}.
GET /api/v1/latest
The newest records of one tag, oldest first within the result. The basic call for a "current value" display.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
tag | yes | The tag to read. | |
type | yes | client or server. | |
limit | no | 1 | Number of records to return. At most endpoints.max_query_limit (default 1000000). |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/latest?tag=SITE1-SITE2&type=client"Response (real output, shortened where marked):
{
"metadata": {
"capacity": 691200,
"count": 1,
"max_sequence": 108,
"min_sequence": 0,
"newest_timestamp": "2026-11-27T11:58:25.163906736Z",
"oldest_timestamp": "2026-11-27T11:56:37.163761350Z"
},
"records": [
{"duplicated": 0, "event": "stats", "icmp_host_unreachable": 0, "icmp_network_unreachable": 0, "icmp_port_unreachable": 384, "lost": 384, "received": 6592, "recv_error": 0, "reordered": 0, "rtt_avg_ns": 283970, "rtt_max_ns": 543359, "rtt_min_ns": 55610, "rtt_p50_ns": 294912, "rtt_p90_ns": 444708, "rtt_p95_ns": 458752, "rtt_p99_ns": 589824, "send_error": 0, "sent": 6976, "sequence": 108, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:58:25.163906736Z", "too_high": 0, "too_low": 0, "uptime_ms": 109001}
]
}metadata describes what Gyroscopic holds for the tag: capacity (records it can hold), min_sequence/max_sequence, count (records returned) and the oldest and newest timestamps. A tag that does not exist (or was evicted) is not an error: the answer is 200 with {"records":[]} and no metadata.
GET /api/v1/oldest
The oldest records still held for a tag. Useful to show how far back the history goes.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
tag | yes | The tag to read. | |
type | yes | client or server. | |
limit | no | 1 | Number of records to return. At most endpoints.max_query_limit (default 1000000). |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/oldest?tag=SITE1-SITE2&type=client&limit=2"Response (real output, shortened where marked):
{
"metadata": {
"capacity": 691200,
"count": 2,
"max_sequence": 108,
"min_sequence": 0,
"newest_timestamp": "2026-11-27T11:58:25.163906736Z",
"oldest_timestamp": "2026-11-27T11:56:37.163761350Z"
},
"records": [
{"sequence": 0, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:56:37.163761350Z", "sent": 64, "lost": 0},
{"sequence": 1, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:56:38.164124397Z", "sent": 128, "lost": 0}
]
}
(records shortened to five fields; the full record is shown under /api/v1/latest)
GET /api/v1/dump
Every record held for a tag, oldest first, or the oldest limit records. Without limit this can be hundreds of thousands of records; prefer latest, range or series. The operator can turn it off (endpoints.dump = false); the path then answers 404.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
tag | yes | The tag to read. | |
type | yes | client or server. | |
limit | no | all | Return only the oldest limit records. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/dump?tag=SITE1-SITE2&type=client&limit=100"
GET /api/v1/sequence
Records by sequence number: from an anchor forward (sequence ≥ seq) or backward (≤ seq). Results are always in ascending order. Use it to page through history or to fetch "everything after the last record I have".
| Parameter | Required | Default | Meaning |
|---|---|---|---|
tag | yes | The tag to read. | |
type | yes | client or server. | |
seq | yes | Anchor sequence number (0 or more). | |
limit | no | 1 | Number of records to return. At most endpoints.max_query_limit (default 1000000). |
direction | no | forward | forward or backward. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/sequence?tag=SITE1-SITE2&type=client&seq=10&limit=3"Response (real output, shortened where marked):
{
"metadata": {
"capacity": 691200,
"count": 3,
"max_sequence": 108,
"min_sequence": 0,
"newest_timestamp": "2026-11-27T11:58:25.163906736Z",
"oldest_timestamp": "2026-11-27T11:56:37.163761350Z"
},
"records": [
{"sequence": 10, "timestamp": "2026-11-27T11:56:47.163313749Z", "sent": 704, "lost": 0},
{"sequence": 11, "timestamp": "2026-11-27T11:56:48.163414053Z", "sent": 768, "lost": 0},
{"sequence": 12, "timestamp": "2026-11-27T11:56:49.164021572Z", "sent": 832, "lost": 0}
]
}
(records shortened to four fields)An anchor that is no longer held, or is in the future, returns 200 with an empty records list and the tag's metadata, so you can see the current min_sequence and max_sequence.
GET /api/v1/range
Records whose sender timestamp lies in a time window (both ends inclusive, RFC 3339). Either end may be left out.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
tag | yes | The tag to read. | |
type | yes | client or server. | |
from | no | Start of the window. | |
to | no | End of the window. | |
limit | no | 1 | Number of matching records. At most endpoints.max_query_limit (default 1000000). |
direction | no | forward | backward fills the limit from the newest matches. |
event | no | stats or final. | |
fields | no | Comma-separated field names; each record then has only these plus tag, sequence and timestamp. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/range?tag=SITE1-SITE2&type=client&from=2026-11-27T11:57:25Z&limit=3&fields=lost,rtt_avg_ns"Response (real output, shortened where marked):
{
"metadata": {
"capacity": 691200,
"count": 3,
"max_sequence": 108,
"min_sequence": 0,
"newest_timestamp": "2026-11-27T11:58:25.163906736Z",
"oldest_timestamp": "2026-11-27T11:56:37.163761350Z"
},
"records": [
{"lost": 384, "rtt_avg_ns": 178984, "sequence": 48, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:57:25.164200940Z"},
{"lost": 384, "rtt_avg_ns": 227893, "sequence": 49, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:57:26.163540456Z"},
{"lost": 384, "rtt_avg_ns": 209465, "sequence": 50, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:57:27.164112746Z"}
]
}The default limit is 1. Set it to the number of records you want.
GET /api/v1/changes
Records where a counter went up by at least min_delta since the record before it. Each match has an extra delta. Answers "when did the loss start?" without reading the whole buffer. A Tracerlight restart is never reported as a change.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
tag | yes | The tag to read. | |
type | yes | client or server. | |
field | yes | A counter: client sent, received, lost, reordered, duplicated, too_low, too_high, send_error, recv_error, icmp_port_unreachable, icmp_host_unreachable, icmp_network_unreachable; server packets_received, packets_sent, invalid_key, decode_error, recv_error, send_error. | |
min_delta | no | 1 | Smallest increase that counts. |
from | no | Window start. | |
to | no | Window end. | |
limit | no | 1 | Number of matches. At most endpoints.max_query_limit (default 1000000). |
direction | no | forward | backward finds the most recent changes. |
fields | no | As for range; delta is always kept. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/changes?tag=SITE1-SITE2&type=client&field=lost&limit=5&fields=lost"Response (real output, shortened where marked):
{
"metadata": {
"capacity": 691200,
"count": 5,
"max_sequence": 108,
"min_sequence": 0,
"newest_timestamp": "2026-11-27T11:58:25.163906736Z",
"oldest_timestamp": "2026-11-27T11:56:37.163761350Z"
},
"records": [
{"delta": 63, "lost": 63, "sequence": 41, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:57:18.164289042Z"},
{"delta": 64, "lost": 127, "sequence": 42, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:57:19.163395589Z"},
{"delta": 64, "lost": 191, "sequence": 43, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:57:20.163449262Z"}
]
}
(first three of five matches shown)
GET /api/v1/status
Counter totals for one tag over everything Gyroscopic holds for it, returned at once. These are totals over the held window (restarts skipped), not lifetime totals since Tracerlight started.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
tag | yes | The tag to read. | |
type | yes | client or server. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/status?tag=SITE1-SITE2&type=client"Response (real output, shortened where marked):
{
"metadata": {
"capacity": 691200,
"count": 109,
"max_sequence": 108,
"min_sequence": 0,
"newest_timestamp": "2026-11-27T11:58:25.163906736Z",
"oldest_timestamp": "2026-11-27T11:56:37.163761350Z"
},
"status": {
"duplicated": 0,
"icmp_host_unreachable": 0,
"icmp_network_unreachable": 0,
"icmp_port_unreachable": 384,
"lost": 384,
"received": 6528,
"recv_error": 0,
"reordered": 0,
"send_error": 0,
"sent": 6912,
"tag": "SITE1-SITE2",
"too_high": 0,
"too_low": 0,
"type": "client"
}
}An unknown tag returns 200 with {}.
GET /api/v1/snapshot
status plus the newest records of one tag in one call: a good fit for a per-tag detail view.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
tag | yes | The tag to read. | |
type | yes | client or server. | |
limit | no | 1 | Number of newest records. At most endpoints.max_query_limit (default 1000000). |
fields | no | Limits the fields of the records (not of status). |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/snapshot?tag=SITE1-SITE2&type=client&fields=lost,rtt_avg_ns"Response (real output, shortened where marked):
{
"latest": {
"metadata": {"capacity": 691200, "count": 1, "max_sequence": 108, "min_sequence": 0, "newest_timestamp": "2026-11-27T11:58:25.163906736Z", "oldest_timestamp": "2026-11-27T11:56:37.163761350Z"},
"records": [{"lost": 384, "rtt_avg_ns": 283970, "sequence": 108, "tag": "SITE1-SITE2", "timestamp": "2026-11-27T11:58:25.163906736Z"}]
},
"status": {
"metadata": {"capacity": 691200, "count": 109, "max_sequence": 108, "min_sequence": 0, "newest_timestamp": "2026-11-27T11:58:25.163906736Z", "oldest_timestamp": "2026-11-27T11:56:37.163761350Z"},
"status": {"duplicated": 0, "icmp_host_unreachable": 0, "icmp_network_unreachable": 0, "icmp_port_unreachable": 384, "lost": 384, "received": 6528, "recv_error": 0, "reordered": 0, "send_error": 0, "sent": 6912, "tag": "SITE1-SITE2", "too_high": 0, "too_low": 0, "type": "client"}
}
}
GET /api/v1/overview
One row per live tag for a short window: counter totals, the number of intervals and restarts, the first and last timestamps, silence_secs (seconds since the newest record), and for client tags the RTT values of the newest record plus rtt_p99_max_ns, the highest p99 in the window. The basic call for a fleet table.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
type | yes | client, server or both. | |
tag | no | Only this tag (exact). | |
tag_contains | no | Only tags that contain this text (case-sensitive, no wildcards). | |
samples | no | 60 | Use the newest N records of each tag (60 = the last minute at 1 s). |
from | no | Window start instead of samples. | |
to | no | Window end instead of samples. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/overview?type=client&samples=120"Response (real output, shortened where marked):
{
"count": 2,
"evicted": [],
"rows": [
{
"counters": {"duplicated": 0, "icmp_host_unreachable": 0, "icmp_network_unreachable": 0, "icmp_port_unreachable": 384, "lost": 384, "received": 6528, "recv_error": 0, "reordered": 0, "send_error": 0, "sent": 6912, "too_high": 0, "too_low": 0},
"earliest_timestamp": "2026-11-27T11:56:37.163761350Z",
"intervals": 108,
"latest_timestamp": "2026-11-27T11:58:25.163906736Z",
"restarts": 0,
"rtt_max_ns": 543359,
"rtt_p50_ns": 294912,
"rtt_p99_max_ns": 7340032,
"rtt_p99_ns": 589824,
"samples": 109,
"silence_secs": 0,
"tag": "SITE1-SITE2",
"type": "client"
},
{
"counters": {"duplicated": 0, "icmp_host_unreachable": 0, "icmp_network_unreachable": 0, "icmp_port_unreachable": 96, "lost": 96, "received": 1632, "recv_error": 0, "reordered": 0, "send_error": 0, "sent": 1728, "too_high": 0, "too_low": 0},
"earliest_timestamp": "2026-11-27T11:56:37.160270477Z",
"intervals": 108,
"latest_timestamp": "2026-11-27T11:58:25.159739086Z",
"restarts": 0,
"rtt_max_ns": 450680,
"rtt_p50_ns": 240298,
"rtt_p99_max_ns": 15728640,
"rtt_p99_ns": 458752,
"samples": 109,
"silence_secs": 0,
"tag": "SITE3-SITE2",
"type": "client"
}
]
}evicted lists recently evicted tags (silent longer than idle_timeout), so a fleet view can show "gone" rather than just dropping a row.
GET /api/v1/episodes
Runs instead of single samples: consecutive intervals where a counter went up (for example a loss episode), a gauge stayed at or above a value, or a Tracerlight process restarted (kind=session). Good for an event list or for shading a chart.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
type | yes | client, server or both. | |
tag | no | Only this tag (exact). | |
tag_contains | no | Only tags that contain this text (case-sensitive, no wildcards). | |
samples | no | 60 | Use the newest N records of each tag (60 = the last minute at 1 s). |
from | no | Window start instead of samples. | |
to | no | Window end instead of samples. | |
field | yes* | A counter (as for changes) or a client RTT field such as rtt_p99_ns. *Not used with kind=session. | |
min_delta | no | 1 | Smallest per-interval increase (counters). |
min_value | for gauges | Smallest gauge value that counts, in ns. | |
gap | no | 0 | Clean intervals allowed inside a run before it closes. |
limit | no | 20 | Number of episodes. |
direction | no | backward | Which end the limit keeps; the result is always oldest first. |
kind | no | from field | counter, gauge or session. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/episodes?type=client&field=lost&samples=120"Response (real output, shortened where marked):
{
"count": 2,
"episodes": [
{"end_sequence": 47, "end_timestamp": "2026-11-27T11:57:24.159757241Z", "field": "lost", "intervals": 7, "kind": "counter", "peak_delta": 16, "start_sequence": 41, "start_timestamp": "2026-11-27T11:57:18.159685967Z", "sum_delta": 96, "tag": "SITE3-SITE2", "type": "client"},
{"end_sequence": 47, "end_timestamp": "2026-11-27T11:57:24.164135737Z", "field": "lost", "intervals": 7, "kind": "counter", "peak_delta": 64, "start_sequence": 41, "start_timestamp": "2026-11-27T11:57:18.164289042Z", "sum_delta": 384, "tag": "SITE1-SITE2", "type": "client"}
]
}curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/episodes?type=server&kind=session&samples=200"{
"count": 1,
"episodes": [
{"end_sequence": 41, "end_timestamp": "2026-11-27T11:57:23.176641045Z", "event": "stats", "kind": "restart", "previous_uptime_ms": 41001, "start_sequence": 41, "start_timestamp": "2026-11-27T11:57:23.176641045Z", "tag": "SITE2_SRV1", "type": "server", "uptime_ms": 1000}
]
}
GET /api/v1/correlated
Which other tags had episodes on the same field at the same time as a reference tag. Answers "is this one path, or many?". The overlap test allows skew_secs of clock difference between senders.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
type | yes | client or server. | |
tag | yes | The reference tag. | |
field | yes | As for episodes. | |
tag_contains | no | Only compare against tags that contain this text. | |
samples | no | 60 | Use the newest N records of each tag (60 = the last minute at 1 s). |
from | no | Window start instead of samples. | |
to | no | Window end instead of samples. | |
min_delta | no | 1 | As for episodes, or auto (half the largest increase seen on the reference tag). |
min_value | for gauges | As for episodes, or auto. | |
gap | no | 0 | As for episodes. |
skew_secs | no | 2 | Clock tolerance in seconds (max 3600). |
limit | no | 20 | Number of matching tags. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/correlated?type=client&tag=SITE1-SITE2&field=lost&samples=120"Response (real output, shortened where marked):
{
"checked": 1,
"match_count": 1,
"matches": [
{"episodes": [{"end_sequence": 47, "end_timestamp": "2026-11-27T11:57:24.159757241Z", "field": "lost", "intervals": 7, "kind": "counter", "peak_delta": 16, "start_sequence": 41, "start_timestamp": "2026-11-27T11:57:18.159685967Z", "sum_delta": 96, "tag": "SITE3-SITE2", "type": "client"}], "overlap_ms": 5995, "tag": "SITE3-SITE2", "type": "client"}
],
"reference": {
"episodes": [{"end_sequence": 47, "end_timestamp": "2026-11-27T11:57:24.164135737Z", "field": "lost", "intervals": 7, "kind": "counter", "peak_delta": 64, "start_sequence": 41, "start_timestamp": "2026-11-27T11:57:18.164289042Z", "sum_delta": 384, "tag": "SITE1-SITE2", "type": "client"}],
"field": "lost",
"kind": "counter",
"samples": 120,
"tag": "SITE1-SITE2",
"type": "client"
}
}
GET /api/v1/health
Fleet triage: the same rows as overview, only for tags with a problem, worst first. Each row adds issues, loss_bp (loss in basis points: 100 = 1%) and expected_interval_ms. The issues, highest severity first: silent (no data for more than five intervals), loss, errors (send, receive and ICMP errors; on servers also key and decode errors), rtt (only when you pass rtt_warn_ns) and restarts. counts counts every evaluated tag per issue, plus healthy. This is a different path from /health above.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
type | yes | client, server or both. | |
tag | no | Only this tag (exact). | |
tag_contains | no | Only tags that contain this text (case-sensitive, no wildcards). | |
samples | no | 60 | Newest N records per tag. from and to are not accepted here (400). |
rtt_warn_ns | no | p99 RTT in ns at or above which a client tag gets the rtt issue. | |
limit | no | 20 | Number of rows. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/health?type=both&samples=120"Response (real output, shortened where marked):
{
"count": 3,
"counts": {
"errors": 2,
"evaluated": 3,
"healthy": 0,
"loss": 2,
"restarts": 1,
"rtt": 0,
"silent": 0
},
"rows": [
{
"counters": {"duplicated": 0, "icmp_host_unreachable": 0, "icmp_network_unreachable": 0, "icmp_port_unreachable": 384, "lost": 384, "received": 6528, "recv_error": 0, "reordered": 0, "send_error": 0, "sent": 6912, "too_high": 0, "too_low": 0},
"earliest_timestamp": "2026-11-27T11:56:37.163761350Z",
"expected_interval_ms": 1000,
"intervals": 108,
"issues": ["loss", "errors"],
"latest_timestamp": "2026-11-27T11:58:25.163906736Z",
"loss_bp": 555,
"restarts": 0,
"rtt_max_ns": 543359,
"rtt_p50_ns": 294912,
"rtt_p99_max_ns": 7340032,
"rtt_p99_ns": 589824,
"samples": 109,
"silence_secs": 0,
"tag": "SITE1-SITE2",
"type": "client"
},
{
"counters": {"decode_error": 0, "invalid_key": 0, "packets_received": 8162, "packets_sent": 8162, "recv_error": 0, "send_error": 0},
"earliest_timestamp": "2026-11-27T11:56:36.158524040Z",
"expected_interval_ms": 1058,
"intervals": 102,
"issues": ["restarts"],
"latest_timestamp": "2026-11-27T11:58:25.176630129Z",
"restarts": 1,
"samples": 104,
"silence_secs": 0,
"tag": "SITE2_SRV1",
"type": "server"
}
]
}
(one of the two client rows shown)
GET /api/v1/buckets
A coarse scan over the whole history of each tag, cheap even for days of data. Gyroscopic keeps summary totals per block of records (bucket_records, default 1024); this returns spans of blocks where a field crossed a threshold. Use it to find "when, in the last week, was there loss?", then zoom in with range or episodes.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
type | yes | client, server or both. | |
tag | no | Only this tag (exact). | |
tag_contains | no | Only tags that contain this text (case-sensitive, no wildcards). | |
field | yes | As for episodes. | |
min_delta | no | 1 | Per-block increase that counts (counters). |
min_value | for gauges | Per-block maximum that counts. | |
from | no | Window start. | |
to | no | Window end. | |
limit | no | 20 | Number of spans. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/buckets?type=client&field=lost"Response (real output, shortened where marked):
{
"count": 2,
"counts": {
"evaluated": 2,
"healthy": 0,
"matched": 2
},
"spans": [
{"buckets": 1, "end_sequence": 108, "end_timestamp": "2026-11-27T11:58:25.163906736Z", "field": "lost", "kind": "counter", "peak_delta": 384, "start_sequence": 0, "start_timestamp": "2026-11-27T11:56:37.163761350Z", "sum_delta": 384, "tag": "SITE1-SITE2", "type": "client"},
{"buckets": 1, "end_sequence": 108, "end_timestamp": "2026-11-27T11:58:25.159739086Z", "field": "lost", "kind": "counter", "peak_delta": 96, "start_sequence": 0, "start_timestamp": "2026-11-27T11:56:37.160270477Z", "sum_delta": 96, "tag": "SITE3-SITE2", "type": "client"}
]
}
GET /api/v1/series
Chart data for many tags of one type in one call, as columns: the best fit for live charts. It replaces polling latest or sequence per tag.
| Parameter | Required | Default | Meaning |
|---|---|---|---|
type | yes | client or server. | |
fields | yes | Comma-separated fields to return as columns. | |
tag | paint | Tags to paint: repeat tag=A&tag=B or tag=A,B. | |
tag_contains | paint | Paint every live tag that contains this text (1–64 characters of letters, digits, _ and -). | |
after | follow | A cursor from next; repeat once per tag. | |
samples | no | 60 (paint) | Records per tag when painting. At most endpoints.series_max_points (default 360). |
limit | no | 60 (follow) | Points per tag when following. |
time | no | rfc3339 | rfc3339 or offset. |
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/series?type=client&tag=SITE1-SITE2,SITE3-SITE2&fields=lost,rtt_avg_ns&samples=3"Response (real output, shortened where marked):
{
"busy": [],
"failed": [],
"fields": ["lost", "rtt_avg_ns"],
"missing": [],
"series": [
{"cursor": 108, "gap": false, "lost": [0, 0], "max_sequence": 108, "min_sequence": 0, "next": "SITE1-SITE2:1cc143b236e14811:108", "reset": false, "restart": [false, false], "rtt_avg_ns": [262930, 283970], "run": "1cc143b236e14811", "sequence": [107, 108], "tag": "SITE1-SITE2", "timestamp": ["2026-11-27T11:58:24.163659502Z", "2026-11-27T11:58:25.163906736Z"], "truncated": false},
{"cursor": 108, "gap": false, "lost": [0, 0], "max_sequence": 108, "min_sequence": 0, "next": "SITE3-SITE2:e386884bdd02c5bd:108", "reset": false, "restart": [false, false], "rtt_avg_ns": [239528, 250390], "run": "e386884bdd02c5bd", "sequence": [107, 108], "tag": "SITE3-SITE2", "timestamp": ["2026-11-27T11:58:24.159808288Z", "2026-11-27T11:58:25.159739086Z"], "truncated": false}
]
}Paint and follow. First paint: ask for the tags with tag or tag_contains and samples. Every series has a next cursor (TAG:RUN:SEQUENCE). Then follow: send the cursors back as after (one per tag) and you get only the new points. If a series comes back with gap or reset set to true (history evicted, or the tag or Gyroscopic restarted), replace that line with the returned points. A tag listed in missing has no data now: keep its last cursor. A tag in busy was skipped this time; ask again.
Points. Counter columns are increases per interval, not running totals; a restart interval is null and marked in restart. RTT columns are the values as sent. samples=N reads N records and returns up to N−1 points, because the oldest record is only the starting value. With time=offset each series has t0 and dt_ms (milliseconds from t0) instead of a list of timestamps.
Follow, with the next cursor from the paint:
curl -s -u "tailfin:$TAILFIN_SECRET" "http://127.0.0.1:3000/api/v1/series?type=client&after=SITE1-SITE2:1cc143b236e14811:221&fields=lost,rtt_avg_ns"{
"busy": [],
"failed": [],
"fields": ["lost", "rtt_avg_ns"],
"missing": [],
"series": [
{"cursor": 224, "gap": false, "lost": [0, 0, 0], "max_sequence": 224, "min_sequence": 0, "next": "SITE1-SITE2:1cc143b236e14811:224", "reset": false, "restart": [false, false, false], "rtt_avg_ns": [144324, 212015, 208053], "run": "1cc143b236e14811", "sequence": [222, 223, 224], "tag": "SITE1-SITE2", "timestamp": ["2026-11-27T12:00:19.164224451Z", "2026-11-27T12:00:20.163510715Z", "2026-11-27T12:00:21.163744997Z"], "truncated": false}
]
}from and to are not accepted here (400 series does not accept from or to).
POST /api/v1/series
The same call with the parameters in a JSON body. Use it beyond a few hundred tags, where a GET line gets too long. Requires Content-Type: application/json (otherwise 415). The body may be up to 1024 + series_max_tags × 112 bytes.
curl -s -u "tailfin:$TAILFIN_SECRET" -H "Content-Type: application/json" \
-d '{"type":"client","tag_contains":"SITE2","fields":"lost,rtt_avg_ns","samples":2}' \
http://127.0.0.1:3000/api/v1/seriesThe answer has the same shape as the GET call. In the body, tag and after can be JSON arrays.
GET /api/v1/semantics
A plain-text reference on what the data means: tag conventions, counters and gauges, how to read windows and changes. The same text AI assistants get over MCP. Worth reading once before you build charts.
curl -s -u "tailfin:$TAILFIN_SECRET" http://127.0.0.1:3000/api/v1/semantics
POST /api/v1/collect
How data gets in: each Tracerlight process posts one JSON record per interval as user tracerlight. A front-end does not need this endpoint; it is listed so you know where the data comes from. Keep it away from browsers (the NGINX example blocks it). Body up to 1 KB, Content-Type: application/json. Answers 202 with {"status":"ok","sequence":42}.
Limits
The operator sets these in the config; the defaults are shown.
| Limit | Default | What you see |
|---|---|---|
Records per call (limit, samples) | 1000000 (max_query_limit) | 400 with the maximum in the message |
Points per tag in series | 360 (series_max_points) | 400 |
Tags per series call | 4096 (series_max_tags) | 400 |
Size of one series answer (tags × points × fields) | 500000 (series_max_cells) | 400 |
Concurrent series calls (HTTP and MCP together) | 4 (series_max_calls) | 503; try again |
| Request time | 10 s (request_timeout_secs) | 503 |
| Body size | 1 KB; POST /api/v1/series: 1024 + series_max_tags × 112 bytes | 413 (plain text) |
Poll gently: once per interval (1 s) is the most that is useful, since a tag gains one record per interval. For live charts, follow with series cursors rather than re-reading whole windows.
A small script
Loss per client tag over the last 5 minutes, with only the Python standard library (no browser, so no CORS question):
import base64, json, os, urllib.request
BASE = "http://127.0.0.1:3000"
AUTH = base64.b64encode(("tailfin:" + os.environ["READ_SECRET"]).encode()).decode()
def get(path):
req = urllib.request.Request(BASE + path, headers={"Authorization": "Basic " + AUTH})
with urllib.request.urlopen(req, timeout=15) as r:
return json.load(r)
# Loss per client tag over the last 5 minutes (300 records at 1 s)
for row in get("/api/v1/overview?type=client&samples=300")["rows"]:
c = row["counters"]
pct = 100.0 * c["lost"] / c["sent"] if c["sent"] else 0.0
print(f'{row["tag"]:24} sent={c["sent"]:>8} lost={c["lost"]:>6} ({pct:.2f}%)')$ TAILFIN_SECRET='<value of auth.tailfin_secret>' python3 loss.py
SITE1-SITE2 sent= 16064 lost= 384 (2.39%)
SITE3-SITE2 sent= 4016 lost= 96 (2.39%)
Test status
Tested with 1.12.6-bcd8897 on Debian 13 (box), 2026-11-27: every curl example on this page against a Gyroscopic fed by a local Tracerlight 2.22.1 server and two clients over loopback, with one forced burst of loss (the outputs shown); the error examples; the self-signed TLS example; the Python script; and the NGINX proxy (see its note). Not yet tested on a real host: the API over a network between hosts, Gyroscopic's allow list with a remote front-end, and the 503 cases (request timeout, call cap).
Configuration: Gyroscopic configuration. Install: Install Gyroscopic.