IP addresses

Subnets, address assignments and reverse DNS.

14 endpoints

IP addresses of a server

#

GET/api/v1/servers/{id}/ips

Path parameters

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

  • id integer> 0

Request body

  • subnetIdintegerrequired

    > 0

  • ipsstring[]required

    min. 1 items, max. 256 items

  • ignoreLocationboolean

    default 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

  • id integer> 0

Request body

  • ipsstring[]required

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

  • id integer
  • assignmentId integer

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

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

  • parentId integer
  • roots stringone of true, false
  • siteId integer | stringone of none, > 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

  • cidrstringrequired

    min. 3 chars, max. 64 chars

  • gatewaystring | null

    max. 64 chars

  • parentIdinteger | null

    > 0

  • ownerIdinteger | null

    > 0

  • siteIdinteger | null

    > 0

  • dnsResolversstring[]
  • descriptionstring

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

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

  • id integer> 0

Request body

  • gatewaystring | null

    max. 64 chars

  • ownerIdinteger | null

    > 0

  • dnsResolversstring[]
  • descriptionstring

    max. 500 chars

  • vlaninteger | null

    ≥ 1, ≤ 4094

  • reservedboolean
  • siteIdinteger | null

    > 0

  • applyToChildrenboolean

    default 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

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

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

  • id integer> 0

Query parameters

  • limit integer≥ 1, ≤ 5000, default 256

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

  • ip stringmax. 64 chars

Request body

  • descriptionstring | null

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

  • ip stringmax. 64 chars

Request body

  • ptrstringrequired

    max. 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"}'