System

Dashboard figures, settings, webhooks and system status.

13 endpoints

Dashboard figures

#

GET/api/v1/dashboard

Counts of servers by state, running jobs and hardware health (failing disks, disk warnings, firmware updates).

Example

curl "https://panel.example.com/api/v1/dashboard" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

Get settings

#

GET/api/v1/settings

Admin only

Example

curl "https://panel.example.com/api/v1/settings" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

Update settings

#

PUT/api/v1/settings

Admin only

Request body

object (map)

Example

curl -X PUT "https://panel.example.com/api/v1/settings" \
  -H "Authorization: Bearer $TRIXOS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

System status

#

GET/api/v1/system/status

Admin only

Version, safety switches and the health of the services.

Example

curl "https://panel.example.com/api/v1/system/status" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

List webhooks

#

GET/api/v1/webhooks

Admin only

Example

curl "https://panel.example.com/api/v1/webhooks" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

Add a webhook

#

POST/api/v1/webhooks

Admin only

Deliveries are signed with X-TrixOS-Signature: sha256=<HMAC-SHA256(secret, body)> when a secret is set. Events: job.success, job.failed, job.cancelled, bmc.unreachable, disk.unhealthy, server.maintenance, or *.

Request body

  • urlstringrequired

    uri, max. 500 chars

  • secretstring

    min. 16 chars, max. 200 chars

  • eventsstring[]required

    min. 1 items

  • enabledboolean

    default true

Example

curl -X POST "https://panel.example.com/api/v1/webhooks" \
  -H "Authorization: Bearer $TRIXOS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://hooks.example.com/trixos","secret":"shared-secret","events":["job.failed","disk.unhealthy"],"enabled":true}'

Delete a webhook

#

DELETE/api/v1/webhooks/{id}

Admin only

Path parameters

  • id integer

Example

curl -X DELETE "https://panel.example.com/api/v1/webhooks/42" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

QR label settings

#

GET/api/v1/settings/labels

Admin only

Logo (Trivox, TrixOS or a custom PNG), its position, height and width on the label, and the text sizes. The mark in the middle of the QR code is fixed. Admins.

Example

curl "https://panel.example.com/api/v1/settings/labels" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

Update the QR label settings

#

PUT/api/v1/settings/labels

Admin only

customLogo is a PNG data URL (at most 256 KB, 4000 × 4000 px; the panel converts SVG, JPEG and WebP to PNG in the browser); null removes it. logo: "custom" needs a custom logo. Admins; audited as settings.labels.

Request body

  • logostring

    one of trivox, trixos, custom

  • positionstring

    one of below, above, right, none

  • sizeinteger

    ≥ 10, ≤ 80

  • logoWidthinteger | null

    ≥ 10, ≤ 100

  • keepRatioboolean
  • hostnameScaleinteger

    ≥ 50, ≤ 200

  • textScaleinteger

    ≥ 50, ≤ 200

  • customLogostring | null

    max. 349558 chars

Example

curl -X PUT "https://panel.example.com/api/v1/settings/labels" \
  -H "Authorization: Bearer $TRIXOS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"logo":"trivox","position":"below","size":10}'

Health of the control server and the site agents

#

GET/api/v1/system/health

Admin only

For the dashboard (admins). Control server: status with reasons, CPU, load, memory and disk of the panel host, uptime, the services (API, worker, poller, PXE/asset service) from their heartbeats (a poller task over its watchdog budget is a warning with the reason), Postgres (latency, database size), Redis (latency, memory), job queue, license and version. watchdog: what the watchdog stopped or warned about in the last 24 hours (jobs, poller tasks, console sessions, API loops), newest first. Site agents: online state, version (update available / pending), WireGuard handshake, PXE state, CPU, load, memory and disk (agent ≥ 1.3.0). history holds one point per minute for the last 24 hours: [unix seconds, CPU %, memory %, disk %, load]. Levels: ok, warn, error (none for a site without an agent).

Example

curl "https://panel.example.com/api/v1/system/health" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

Watchdog limits and its actions of the last 24 hours

#

GET/api/v1/system/watchdog

Admin only

Admins. limits: the limit per job type and per step in minutes (defaults, overridden by TRIXOS_WATCHDOG_LIMITS and the setting watchdog), poller task budgets, the queue / dead-worker / resume limits. events: what the watchdog stopped (jobs, console sessions) or warned about (poller tasks, API loops over their budget) in the last hours (default 24, max 72), newest first, with the reason.

Query parameters

  • hours integer≥ 1, ≤ 72, default 24

Example

curl "https://panel.example.com/api/v1/system/watchdog" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

Update status

#

GET/api/v1/system/update

Admin only

This version, the newest release (with its changelog entry and whether its signed release record verifies), whether the host updater is installed, and the state and log of the last update. refresh=1 checks the release server again (otherwise cached for an hour).

Query parameters

  • refresh stringone of 0, 1

Example

curl "https://panel.example.com/api/v1/system/update" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

Update TrixOS

#

POST/api/v1/system/update

Admin only

Asks the host updater to install version, which must be the newest release, newer than this one and signed with a trusted release key. The updater backs up the database, verifies the release again, installs it, checks health and rolls back if the new version does not come up. Follow it with GET /system/update.

Request body

  • versionstringrequired

    pattern ^\d{1,4}\.\d{1,4}\.\d{1,4}$

Example

curl -X POST "https://panel.example.com/api/v1/system/update" \
  -H "Authorization: Bearer $TRIXOS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"version":"version"}'