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

  • search stringmax. 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

  • usernamestringrequired

    min. 2 chars, max. 64 chars, pattern ^[A-Za-z0-9._@-]+$

  • namestringrequired

    min. 1 chars, max. 200 chars

  • emailstring | null

    email, 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 | null

    min. 10 chars, max. 200 chars

  • rolestring

    one of admin, reseller, user, default "user"

  • parentIdinteger | null

    > 0

  • canCreateSubUsersboolean
  • descriptionstring | null

    max. 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

  • id integer> 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

  • id integer> 0

Request body

  • namestring

    min. 1 chars, max. 200 chars

  • emailstring | null

    email, 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

    min. 10 chars, max. 200 chars

  • currentPasswordstring

    max. 500 chars

  • rolestring

    one of admin, reseller, user

  • statusstring

    one of enabled, disabled

  • timezonestring

    max. 64 chars

  • languagestring

    max. 15 chars

  • allowedHostsstring[]
  • canCreateSubUsersboolean
  • descriptionstring | null

    max. 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

  • id integer> 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

  • id integer> 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

  • id integer> 0

Request body

  • namestringrequired

    min. 1 chars, max. 100 chars

  • publicKeystringrequired

    min. 20 chars, max. 16000 chars

  • descriptionstring | null

    max. 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

  • id integer
  • keyId integer

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

  • id integer> 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

  • id integer> 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

  • id integer> 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"]}'