Inventory & stock
Hardware parts across all servers and in stock (spare, defective, RMA, retired).
7 endpoints
List hardware parts
#GET/api/v1/inventory
Admin only
Installed parts and stock. Filters: component, status (installed, spare, defective, rma, retired, or stock for everything not installed), siteId, search; paged with page and perPage.
Query parameters
componentstringone ofcpu,memory,disk,mainboard,nic,gpu,psu,otherstatusstringone ofinstalled,spare,defective,rma,retired,stocksiteIdinteger | stringone ofnone, > 0searchstringmax. 100 charspageinteger≥ 1, default1perPageinteger≥ 1, ≤ 1000, default100
Example
curl "https://panel.example.com/api/v1/inventory" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Add a part
#POST/api/v1/inventory
Admin only
Usually a stock part (spare by default). A part with serverId is installed in that server.
Request body
componentstringrequiredone of
cpu,memory,disk,mainboard,nic,gpu,psu,othermodelstringmax. 200 chars, default
""valuestringmax. 100 chars, default
""unitstringmax. 20 chars, default
""serialstring | nullmax. 100 chars
statusstringone of
installed,spare,defective,rma,retired, default"spare"serverIdinteger | null> 0
siteIdinteger | null> 0
notesstringmax. 2000 chars, default
""
Example
curl -X POST "https://panel.example.com/api/v1/inventory" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"component":"disk","model":"Samsung PM883 960GB","value":"915715","unit":"MiB","serial":"S4ENNF0M123456","status":"spare","siteId":1}'Update a part
#PATCH/api/v1/inventory/{id}
Admin only
Change the status (for example to rma), the location, or install it in a server.
Path parameters
idinteger> 0
Request body
componentstringone of
cpu,memory,disk,mainboard,nic,gpu,psu,othermodelstringmax. 200 chars
valuestringmax. 100 chars
unitstringmax. 20 chars
serialstring | nullmax. 100 chars
statusstringone of
installed,spare,defective,rma,retiredserverIdinteger | null> 0
siteIdinteger | null> 0
notesstringmax. 2000 chars
Example
curl -X PATCH "https://panel.example.com/api/v1/inventory/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status":"rma"}'Delete a part
#DELETE/api/v1/inventory/{id}
Admin only
Path parameters
idinteger> 0
Example
curl -X DELETE "https://panel.example.com/api/v1/inventory/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Spare parts in stock
#GET/api/v1/inventory/stock
Admin only
Spare parts without a server; with serverId, those stored at that server’s datacenter or without a datacenter.
Query parameters
serverIdinteger> 0
Example
curl "https://panel.example.com/api/v1/inventory/stock" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Which servers have hardware data and where it came from
#GET/api/v1/inventory/coverage
Admin only
How complete the hardware data is: servers with CPU / memory / disk data, by where it came from (OS scan, BMC, TenantOS import, entered by hand), and the servers without any, with whether their BMC can be read.
Example
curl "https://panel.example.com/api/v1/inventory/coverage" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Read the hardware of several servers from their BMCs (background, read-only)
#POST/api/v1/inventory/bmc-read
Admin only
Read the hardware of several servers from their BMCs (read-only, same as "Read from BMC" on a server): in the background, 4 at a time, each limited to 2 minutes; the coverage shows progress. Per component, data from an OS scan, the import or entered by hand is kept.
Request body
serverIdsinteger[]requiredmin. 1 items, max. 500 items
Example
curl -X POST "https://panel.example.com/api/v1/inventory/bmc-read" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"serverIds":[1]}'