Datacenters & racks

Datacenter overview and rack management. Rack placement of a server is part of the server (PATCH /servers/{id}).

6 endpoints

Datacenters with racks and counts

#

GET/api/v1/datacenters

Admin only

Example

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

List racks

#

GET/api/v1/racks

Admin only

Query parameters

  • siteId integer> 0

Example

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

Add a rack

#

POST/api/v1/racks

Admin only

Names are unique per site.

Request body

  • siteIdintegerrequired

    > 0

  • namestringrequired

    min. 1 chars, max. 64 chars

  • locationstring

    max. 200 chars, default ""

  • descriptionstring

    max. 1000 chars, default ""

  • heightUinteger

    ≥ 1, ≤ 60, default 42

Example

curl -X POST "https://panel.example.com/api/v1/racks" \
  -H "Authorization: Bearer $TRIXOS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"siteId":1,"name":"B04","heightU":42,"location":"Room 2, row B"}'

Get a rack with its servers

#

GET/api/v1/racks/{id}

Admin only

Path parameters

  • id integer> 0

Example

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

Update a rack

#

PATCH/api/v1/racks/{id}

Admin only

A rack can’t shrink below its highest mounted unit or change site while servers are in it.

Path parameters

  • id integer> 0

Request body

  • siteIdinteger

    > 0

  • namestring

    min. 1 chars, max. 64 chars

  • locationstring

    max. 200 chars

  • descriptionstring

    max. 1000 chars

  • heightUinteger

    ≥ 1, ≤ 60

Example

curl -X PATCH "https://panel.example.com/api/v1/racks/42" \
  -H "Authorization: Bearer $TRIXOS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"siteId":1,"name":"example","location":"location"}'

Delete an empty rack

#

DELETE/api/v1/racks/{id}

Admin only

Path parameters

  • id integer> 0

Example

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