Users
Users, SSH keys, login history and per-server permissions.
11 endpoints
List users
#GET/api/v1/users
Users below the caller in the user tree.
Query parameters
searchstringmax. 100 chars
Example
curl "https://panel.example.com/api/v1/users" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Add a user
#POST/api/v1/users
Request body
usernamestringrequiredmin. 2 chars, max. 64 chars, pattern
^[A-Za-z0-9._@-]+$namestringrequiredmin. 1 chars, max. 200 chars
emailstring | nullemail, pattern
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$passwordstring | nullmin. 10 chars, max. 200 chars
rolestringone of
admin,reseller,user, default"user"parentIdinteger | null> 0
canCreateSubUsersbooleandescriptionstring | nullmax. 2000 chars
Example
curl -X POST "https://panel.example.com/api/v1/users" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username":"customer42","name":"Example Ltd","email":"[email protected]","password":"a-long-password","role":"user"}'Get a user
#GET/api/v1/users/{id}
Path parameters
idinteger> 0
Example
curl "https://panel.example.com/api/v1/users/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Update a user
#PATCH/api/v1/users/{id}
Path parameters
idinteger> 0
Request body
namestringmin. 1 chars, max. 200 chars
emailstring | nullemail, pattern
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$passwordstringmin. 10 chars, max. 200 chars
currentPasswordstringmax. 500 chars
rolestringone of
admin,reseller,userstatusstringone of
enabled,disabledtimezonestringmax. 64 chars
languagestringmax. 15 chars
allowedHostsstring[]canCreateSubUsersbooleandescriptionstring | nullmax. 2000 chars
Example
curl -X PATCH "https://panel.example.com/api/v1/users/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"example","email":"[email protected]","password":"a-long-password"}'Delete a user
#DELETE/api/v1/users/{id}
Path parameters
idinteger> 0
Example
curl -X DELETE "https://panel.example.com/api/v1/users/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN"List SSH keys
#GET/api/v1/users/{id}/ssh-keys
Path parameters
idinteger> 0
Example
curl "https://panel.example.com/api/v1/users/42/ssh-keys" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Add an SSH key
#POST/api/v1/users/{id}/ssh-keys
Path parameters
idinteger> 0
Request body
namestringrequiredmin. 1 chars, max. 100 chars
publicKeystringrequiredmin. 20 chars, max. 16000 chars
descriptionstring | nullmax. 500 chars
Example
curl -X POST "https://panel.example.com/api/v1/users/42/ssh-keys" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"laptop","publicKey":"ssh-ed25519 AAAA… user@laptop"}'Delete an SSH key
#DELETE/api/v1/users/{id}/ssh-keys/{keyId}
Path parameters
idintegerkeyIdinteger
Example
curl -X DELETE "https://panel.example.com/api/v1/users/42/ssh-keys/2" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Login history
#GET/api/v1/users/{id}/login-history
Path parameters
idinteger> 0
Example
curl "https://panel.example.com/api/v1/users/42/login-history" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Server permissions of a user
#GET/api/v1/users/{id}/server-permissions
Path parameters
idinteger> 0
Example
curl "https://panel.example.com/api/v1/users/42/server-permissions" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Set server permissions
#PUT/api/v1/users/{id}/server-permissions
Grants for a server the user doesn’t own: read, power, console, provision, ipam, write. An empty list removes the grant.
Path parameters
idinteger> 0
Request body
serverIdintegerrequired> 0
permissionsstring[]required
Example
curl -X PUT "https://panel.example.com/api/v1/users/42/server-permissions" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"serverId":42,"permissions":["read","power","console"]}'