PilotFoxDocs

Get instance statistics

GET
/api/v1/admin/stats

This process's counters since it started (ingest, the event writer, replay; meta.instance names the replica that answered) and the size of each ClickHouse table.

Requires a signed-in system administrator (session cookie). API keys and share links: 401; other signed-in users: 403.

Authorization

session
cookie__Secure-pilotfox.session_token<token>

The web app's sign-in session, acting with the user's role; named pilotfox.session_token on an instance whose PUBLIC_URL is plain http. Under /api/v1, a POST, PUT, PATCH or DELETE carrying a cookie must come from the instance's own origin (Origin: PUBLIC_URL or a DASHBOARD_ORIGINS entry; else 403), and a body it carries must be JSON or multipart (else 415).

Response Body

OK

application/json
  1. response
data*
meta*
Example Request
curl -X GET 'https://pilotfox.app/api/v1/admin/stats'
Example Response200
{  "data": {    "uptimeSeconds": -9007199254740991,    "ingest": {      "accepted": 0,      "ignored": {        "property1": 0,        "property2": 0      },      "invalid": 0,      "unknownSite": 0,      "rateLimited": 0,      "forbiddenSite": 0,      "tsOutOfRange": 0,      "bots": {        "observed": 0,        "blocked": 0,        "byLayer": {          "ua": 0,          "headers": 0,          "client": 0,          "asn": 0,          "rate": 0        }      }    },    "writer": {      "buffered": {        "property1": 0,        "property2": 0      },      "inflight": 0,      "inserted": 0,      "retries": 0,      "spooledRows": 0,      "replayedRows": 0,      "droppedRows": 0,      "spoolFiles": 0,      "spoolRows": 0,      "failedFiles": 0,      "degraded": true    },    "replay": {      "accepted": 0,      "dropped": {        "property1": 0,        "property2": 0      },      "decode": {        "timeouts": 0,        "outOfMemory": 0      }    },    "clickhouse": [      {        "table": "string",        "rows": 0,        "bytes": 0      }    ]  },  "meta": {    "instance": "string"  }}