TenantOS-compatible API
These endpoints answer like TenantOS: same paths, same {"result": …, "message": "success"} envelope, same error texts. An existing integration, such as the control panel that sells your servers, keeps working when you point it at TrixOS with a TrixOS API token. Ownership is enforced per token, so a customer’s own token only sees their servers.
- Success: HTTP 200,
{"result": <payload>, "message": "success"}. A few list endpoints leave outmessage, as TenantOS does. - Errors: HTTP 500,
{"message": "Exception", "result": "<text>"}, with the TenantOS texts, for exampleAccess to this server denied.orThis server is suspended. - Missing or invalid token: HTTP 401,
{"message": "Unauthenticated."}. - Power actions answer synchronously with
"executed".GETrequests with a JSON body are accepted where TenantOS accepted them.
For new integrations, use the native API instead: it has typed errors, jobs you can follow, and covers everything TrixOS can do.
35 endpoints
List servers
#GET/api/servers
hideIpAssignments=1 leaves out the IP assignments.
Example
curl "https://panel.example.com/api/servers" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Find the server of an IP address
#GET/api/servers/getByIp/{ip}
Answers Access to this IP denied. (HTTP 500) for addresses that are unknown or not visible to the token, like TenantOS.
Path parameters
ipstring
Example
curl "https://panel.example.com/api/servers/getByIp/203.0.113.10" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Get a server
#GET/api/servers/{id}
Path parameters
idstring
Example
curl "https://panel.example.com/api/servers/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Suspend, unsuspend or change owner
#PUT/api/servers/{id}
Body {suspendUserIds: [...], suspendPowerAction?: "setPowerOff"} or {user_id}.
Path parameters
idstring
Example
curl -X PUT "https://panel.example.com/api/servers/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"suspendUserIds":[17],"suspendPowerAction":"setPowerOff"}'Power action (GET)
#GET/api/servers/{id}/power/{action}
Same as the POST variant; the TenantOS web panel used GET.
Path parameters
idstringactionstring
Example
curl "https://panel.example.com/api/servers/42/power/setPowerCycle" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Power action
#POST/api/servers/{id}/power/{action}
action: setPowerOn, setPowerOff, setPowerSoft, setPowerReset, setPowerCycle, setBmcReset. Answers synchronously with "executed".
Path parameters
idstringactionstring
Example
curl -X POST "https://panel.example.com/api/servers/42/power/setPowerCycle" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"method":"setPowerCycle"}'Run a BMC command
#POST/api/servers/{id}/bmc/executeCommand
Returns the raw ipmitool output, for example "Chassis Power is on".
Path parameters
idstring
Example
curl -X POST "https://panel.example.com/api/servers/42/bmc/executeCommand" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"command":"power status"}'Start a console
#GET/api/servers/{id}/console/start
consoleMode=standard|web; the JSON body may carry authorizedIp. Returns {token, accessUrl}.
Path parameters
idstring
Example
curl "https://panel.example.com/api/servers/42/console/start" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Reinstall the operating system
#POST/api/servers/{id}/provisioning/startReinstallation
TenantOS catalogue ids (profileId, disklayoutId, runScripts) are mapped to TrixOS.
Path parameters
idstring
Example
curl -X POST "https://panel.example.com/api/servers/42/provisioning/startReinstallation" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"profileId":3,"rootpassword":"a-long-password","runScripts":[],"sshkeys":["ssh-ed25519 AAAA…"]}'Cancel a reinstall
#GET/api/servers/{id}/provisioning/stopReinstallation
withoutPowerReset=1 leaves the power state alone.
Path parameters
idstring
Example
curl "https://panel.example.com/api/servers/42/provisioning/stopReinstallation" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Installable profiles of a server
#GET/api/servers/{id}/provisioning/getProfiles
Path parameters
idstring
Example
curl "https://panel.example.com/api/servers/42/provisioning/getProfiles" \
-H "Authorization: Bearer $TRIXOS_TOKEN"IP assignments of a server
#GET/api/servers/{id}/ipassignments
Path parameters
idstring
Example
curl "https://panel.example.com/api/servers/42/ipassignments" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Assign IP addresses
#POST/api/servers/{id}/ipassignments
Path parameters
idstring
Example
curl -X POST "https://panel.example.com/api/servers/42/ipassignments" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ips":["203.0.113.10"],"subnets_id":12}'Free addresses of a subnet
#POST/api/servers/{id}/ipassignments/getAssignableIpsOfSubnet
The most frequent call of the Trivox control panel; answered from an index.
Path parameters
idstring
Example
curl -X POST "https://panel.example.com/api/servers/42/ipassignments/getAssignableIpsOfSubnet" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"subnets_id":12}'Subnets with free addresses
#GET/api/servers/{id}/ipassignments/getAssignableSubnets
Path parameters
idstring
Example
curl "https://panel.example.com/api/servers/42/ipassignments/getAssignableSubnets" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Make an address primary
#PUT/api/servers/{id}/ipassignments/{assignmentId}
Path parameters
idstringassignmentIdstring
Example
curl -X PUT "https://panel.example.com/api/servers/42/ipassignments/7" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ip":"203.0.113.10","primary_ip":1}'Remove IP addresses
#DELETE/api/servers/{id}/ipassignments/ip
Path parameters
idstring
Example
curl -X DELETE "https://panel.example.com/api/servers/42/ipassignments/ip" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ips":["203.0.113.10"]}'Comment an address
#POST/api/ip/comment
Example
curl -X POST "https://panel.example.com/api/ip/comment" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"adminIp":"203.0.113.10","type":"singleIp","comment":"IPv4 add-on"}'Release a reserved address
#POST/api/ip/unreserve
Example
curl -X POST "https://panel.example.com/api/ip/unreserve" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"adminIp":"203.0.113.10","type":"singleIp"}'Reserve an address
#POST/api/ip/reserve
Example
curl -X POST "https://panel.example.com/api/ip/reserve" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"adminIp":"203.0.113.10","type":"singleIp"}'List subnets
#GET/api/subnets
Example
curl "https://panel.example.com/api/subnets" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Get a subnet
#GET/api/subnets/{id}
Path parameters
idstring
Example
curl "https://panel.example.com/api/subnets/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Subnet with addresses and child subnets
#GET/api/subnets/{id}/withDetails
Path parameters
idstring
Example
curl "https://panel.example.com/api/subnets/42/withDetails" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Connections of a server
#GET/api/servers/{id}/connections
BMC, DHCP/PXE and switch connections.
Path parameters
idstring
Example
curl "https://panel.example.com/api/servers/42/connections" \
-H "Authorization: Bearer $TRIXOS_TOKEN"OS profiles
#GET/api/pxe/profiles
Example
curl "https://panel.example.com/api/pxe/profiles" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Disk layouts
#GET/api/pxe/disklayouts
Example
curl "https://panel.example.com/api/pxe/disklayouts" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Post-install scripts
#GET/api/pxe/scripts
Example
curl "https://panel.example.com/api/pxe/scripts" \
-H "Authorization: Bearer $TRIXOS_TOKEN"List users
#GET/api/users
Example
curl "https://panel.example.com/api/users" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Create a user
#POST/api/users
Example
curl -X POST "https://panel.example.com/api/users" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"root_owner":1,"name":"Example Ltd","username":"customer42","password":"a-long-password","role_id":3}'Get a user
#GET/api/users/{id}
Path parameters
idstring
Example
curl "https://panel.example.com/api/users/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN"List API tokens of a user
#GET/api/users/{id}/tokens
Path parameters
idstring
Example
curl "https://panel.example.com/api/users/42/tokens" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Create an API token
#POST/api/users/{id}/tokens
Returns {token, allowedHosts}.
Path parameters
idstring
Example
curl -X POST "https://panel.example.com/api/users/42/tokens" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Trivox CP"}'List SSH keys
#GET/api/users/{id}/sshkeys
Path parameters
idstring
Example
curl "https://panel.example.com/api/users/42/sshkeys" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Add an SSH key
#POST/api/users/{id}/sshkeys
Path parameters
idstring
Example
curl -X POST "https://panel.example.com/api/users/42/sshkeys" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"laptop","pubkey":"ssh-ed25519 AAAA… user@laptop"}'Delete an SSH key
#DELETE/api/users/{id}/sshkeys/{keyId}
Path parameters
idstringkeyIdstring
Example
curl -X DELETE "https://panel.example.com/api/users/42/sshkeys/2" \
-H "Authorization: Bearer $TRIXOS_TOKEN"