Console

One-time console tokens for serial, graphical KVM and the BMC web interface.

4 endpoints

Open a console

#

POST/api/v1/servers/{id}/console

One-time console token (60 s, bound to the user, server and IP) for sol (serial), vnc (KVM) or web (the BMC web UI). Open /console/{token}?m={mode} in a window; the page connects to /api/v1/ws/console/{token}. The BMC web UI is for admins, and for owners only when the IPMI device gives users an account of their own (temporary BMC user or client account).

Path parameters

  • id integer> 0

Request body

  • modestring

    one of sol, vnc, web, default "sol"

Example

curl -X POST "https://panel.example.com/api/v1/servers/42/console" \
  -H "Authorization: Bearer $TRIXOS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"sol"}'

Console session

#

GET/api/v1/console/{token}

State of a console session for the console page: pending (token not used yet), active, ended (with endReason: closed, user, console, error, restart, watchdog = open longer than 8 h) or expired; the server and its last known power state; whether the page may show the BMC login (loginAvailable). Authenticated by the console token in the path, from the IP it was issued for.

Path parameters

  • token stringpattern ^[0-9a-f]{40}$

Example

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

BMC login of a console session

#

POST/api/v1/console/{token}/login

The BMC account the viewer logged in with, for when the automatic login fails: the temporary BMC user of the session, the client account, or (admins only) the stored account. Only while the session is active and when the IPMI device allows it (Configuration → IPMI device → Login details on the console page). Audited.

Path parameters

  • token stringpattern ^[0-9a-f]{40}$

Example

curl -X POST "https://panel.example.com/api/v1/console/JOB_TOKEN/login" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"

End a console session

#

POST/api/v1/console/{token}/end

Ends the session now: the websocket closes, the viewer stops and a temporary BMC user is deleted. The console page calls it for "End session" and when its window closes (sendBeacon). Idempotent.

Path parameters

  • token stringpattern ^[0-9a-f]{40}$

Example

curl -X POST "https://panel.example.com/api/v1/console/JOB_TOKEN/end" \
  -H "Authorization: Bearer $TRIXOS_TOKEN"