IP addresses
Subnets, address assignments and reverse DNS.
14 endpoints
IP addresses of a server
#GET/api/v1/servers/{id}/ips
Path parameters
idinteger> 0
Example
curl "https://panel.example.com/api/v1/servers/42/ips" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Assign IP addresses
#POST/api/v1/servers/{id}/ips
Addresses from one subnet. A subnet at another datacenter than the server is refused unless an admin sets ignoreLocation.
Path parameters
idinteger> 0
Request body
subnetIdintegerrequired> 0
ipsstring[]requiredmin. 1 items, max. 256 items
ignoreLocationbooleandefault
false
Example
curl -X POST "https://panel.example.com/api/v1/servers/42/ips" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"subnetId":12,"ips":["203.0.113.10"]}'Remove IP addresses
#DELETE/api/v1/servers/{id}/ips
Removed addresses stay reserved unless the setting says otherwise.
Path parameters
idinteger> 0
Request body
ipsstring[]requiredmin. 1 items
Example
curl -X DELETE "https://panel.example.com/api/v1/servers/42/ips" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ips":["203.0.113.10"]}'Make an address primary
#POST/api/v1/servers/{id}/ips/{assignmentId}/primary
Path parameters
idintegerassignmentIdinteger
Example
curl -X POST "https://panel.example.com/api/v1/servers/42/ips/7/primary" \
-H "Authorization: Bearer $TRIXOS_TOKEN"IP overview of a server
#GET/api/v1/servers/{id}/ip-views
Assignments grouped with their subnets, gateway and DNS, as the server page shows them.
Path parameters
idinteger> 0
Example
curl "https://panel.example.com/api/v1/servers/42/ip-views" \
-H "Authorization: Bearer $TRIXOS_TOKEN"List subnets
#GET/api/v1/subnets
Filters: parentId, roots=true, siteId=<id>|none.
Query parameters
parentIdintegerrootsstringone oftrue,falsesiteIdinteger | stringone ofnone, > 0
Example
curl "https://panel.example.com/api/v1/subnets" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Add a subnet
#POST/api/v1/subnets
Admin only
IPv4 host addresses are created with it; network, gateway and broadcast are reserved. Child subnets inherit the parent’s location.
Request body
cidrstringrequiredmin. 3 chars, max. 64 chars
gatewaystring | nullmax. 64 chars
parentIdinteger | null> 0
ownerIdinteger | null> 0
siteIdinteger | null> 0
dnsResolversstring[]descriptionstringmax. 500 chars
vlaninteger | null≥ 1, ≤ 4094
generateIpsboolean
Example
curl -X POST "https://panel.example.com/api/v1/subnets" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"cidr":"203.0.113.0/24","gateway":"203.0.113.1","siteId":1,"dnsResolvers":["8.8.8.8","8.8.4.4"]}'Get a subnet with its addresses
#GET/api/v1/subnets/{id}
Path parameters
idinteger> 0
Example
curl "https://panel.example.com/api/v1/subnets/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Update a subnet
#PATCH/api/v1/subnets/{id}
Admin only
siteId with applyToChildren: true moves the whole tree to another datacenter.
Path parameters
idinteger> 0
Request body
gatewaystring | nullmax. 64 chars
ownerIdinteger | null> 0
dnsResolversstring[]descriptionstringmax. 500 chars
vlaninteger | null≥ 1, ≤ 4094
reservedbooleansiteIdinteger | null> 0
applyToChildrenbooleandefault
true
Example
curl -X PATCH "https://panel.example.com/api/v1/subnets/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"gateway":"203.0.113.1","ownerId":1,"dnsResolvers":["dnsResolver"]}'Delete a subnet
#DELETE/api/v1/subnets/{id}
Admin only
Path parameters
idinteger> 0
Example
curl -X DELETE "https://panel.example.com/api/v1/subnets/42" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Split a subnet
#POST/api/v1/subnets/{id}/split
Admin only
Creates child subnets of the given prefix length and moves the addresses into them.
Path parameters
idinteger> 0
Request body
prefixintegerrequired≥ 1, ≤ 128
limitinteger≥ 1, ≤ 65536, default
4096
Example
curl -X POST "https://panel.example.com/api/v1/subnets/42/split" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prefix":26}'Free addresses of a subnet
#GET/api/v1/subnets/{id}/free
Path parameters
idinteger> 0
Query parameters
limitinteger≥ 1, ≤ 5000, default256
Example
curl "https://panel.example.com/api/v1/subnets/42/free" \
-H "Authorization: Bearer $TRIXOS_TOKEN"Update an address
#PATCH/api/v1/ips/{ip}
Description and reserved flag.
Path parameters
ipstringmax. 64 chars
Request body
descriptionstring | nullmax. 500 chars
reservedboolean
Example
curl -X PATCH "https://panel.example.com/api/v1/ips/203.0.113.10" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"description":"Gateway VM","reserved":true}'Set reverse DNS
#PUT/api/v1/rdns/{ip}
Stores the PTR record and pushes it to PowerDNS when configured.
Path parameters
ipstringmax. 64 chars
Request body
ptrstringrequiredmax. 253 chars, pattern
^[A-Za-z0-9.-]*$
Example
curl -X PUT "https://panel.example.com/api/v1/rdns/203.0.113.10" \
-H "Authorization: Bearer $TRIXOS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ptr":"web-01.example.com"}'