GET /api/subnets
List of subnets

GET /api/domains/:domain_id/subnets
List of subnets for a domain

GET /api/locations/:location_id/subnets
List of subnets per location

GET /api/organizations/:organization_id/subnets
List of subnets per organization

Params

Param name Description
domain_id
optional

ID of domain

Validations:

  • String

location_id
optional

Scope by locations

Validations:

  • Integer

organization_id
optional

Scope by organizations

Validations:

  • Integer

search
optional

filter results

Validations:

  • String

order
optional

Sort and order by a searchable field, e.g. '<field> DESC'

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, 'all' to return all results

Validations:

  • Must match regular expression /\A([1-9]\d*|all)\Z$/.

Search fields

Field name Type Possible values
boot_mode string
dns_primary string
dns_secondary string
domain string
gateway string
id integer
ipam string
location string
location_id integer
mask string
mtu integer
name text
network string
nic_delay integer
organization string
organization_id integer
params string
type string
vlanid integer

GET /api/subnets/:id
Show a subnet

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

show_hidden_parameters
optional

Display hidden parameter values

Validations:

  • Must be one of: true, false, 1, 0.


POST /api/subnets
Create a subnet

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

subnet
required

Validations:

  • Hash

subnet[name]
required

Subnet name

Validations:

  • String

subnet[description]
optional , nil allowed

Subnet description

Validations:

  • String

subnet[network_type]
optional , nil allowed

Type or protocol, IPv4 or IPv6, defaults to IPv4

Validations:

  • Must be one of: IPv4, IPv6.

subnet[network]
required

Subnet network

Validations:

  • String

subnet[cidr]
optional , nil allowed

Network prefix in CIDR notation

Validations:

  • String

subnet[mask]
optional , nil allowed

Netmask for this subnet

Validations:

  • String

subnet[gateway]
optional , nil allowed

Subnet gateway

Validations:

  • String

subnet[dns_primary]
optional , nil allowed

Primary DNS for this subnet

Validations:

  • String

subnet[dns_secondary]
optional , nil allowed

Secondary DNS for this subnet

Validations:

  • String

subnet[ipam]
optional , nil allowed

IP Address auto suggestion mode for this subnet.

Validations:

  • Must be one of: DHCP, Internal DB, Random DB, EUI-64, External IPAM, None.

subnet[externalipam_group]
optional , nil allowed

External IPAM group - only relevant when IPAM is set to external

Validations:

  • String

subnet[from]
optional , nil allowed

Starting IP Address for IP auto suggestion

Validations:

  • String

subnet[to]
optional , nil allowed

Ending IP Address for IP auto suggestion

Validations:

  • String

subnet[vlanid]
optional , nil allowed

VLAN ID for this subnet

Validations:

  • String

subnet[mtu]
optional , nil allowed

MTU for this subnet

Validations:

  • Integer

subnet[domain_ids]
optional , nil allowed

Domains in which this subnet is part

Validations:

  • Must be an array of any type

subnet[dhcp_id]
optional , nil allowed

DHCP Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[tftp_id]
optional , nil allowed

TFTP Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[httpboot_id]
optional , nil allowed

HTTPBoot Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[externalipam_id]
optional , nil allowed

External IPAM Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[dns_id]
optional , nil allowed

DNS Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[template_id]
optional , nil allowed

Template HTTP(S) Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[bmc_id]
optional , nil allowed

BMC Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[boot_mode]
optional , nil allowed

Default boot mode for interfaces assigned to this subnet.

Validations:

  • Must be one of: Static, DHCP.

subnet[subnet_parameters_attributes]
optional , nil allowed

Array of parameters (name, value)

Validations:

  • Must be an array of any type

subnet[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

subnet[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/subnets/:id
Update a subnet

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Subnet numeric identifier

Validations:

  • Must be a number.

subnet
required

Validations:

  • Hash

subnet[name]
optional

Subnet name

Validations:

  • String

subnet[description]
optional , nil allowed

Subnet description

Validations:

  • String

subnet[network_type]
optional , nil allowed

Type or protocol, IPv4 or IPv6, defaults to IPv4

Validations:

  • Must be one of: IPv4, IPv6.

subnet[network]
optional

Subnet network

Validations:

  • String

subnet[cidr]
optional , nil allowed

Network prefix in CIDR notation

Validations:

  • String

subnet[mask]
optional , nil allowed

Netmask for this subnet

Validations:

  • String

subnet[gateway]
optional , nil allowed

Subnet gateway

Validations:

  • String

subnet[dns_primary]
optional , nil allowed

Primary DNS for this subnet

Validations:

  • String

subnet[dns_secondary]
optional , nil allowed

Secondary DNS for this subnet

Validations:

  • String

subnet[ipam]
optional , nil allowed

IP Address auto suggestion mode for this subnet.

Validations:

  • Must be one of: DHCP, Internal DB, Random DB, EUI-64, External IPAM, None.

subnet[externalipam_group]
optional , nil allowed

External IPAM group - only relevant when IPAM is set to external

Validations:

  • String

subnet[from]
optional , nil allowed

Starting IP Address for IP auto suggestion

Validations:

  • String

subnet[to]
optional , nil allowed

Ending IP Address for IP auto suggestion

Validations:

  • String

subnet[vlanid]
optional , nil allowed

VLAN ID for this subnet

Validations:

  • String

subnet[mtu]
optional , nil allowed

MTU for this subnet

Validations:

  • Integer

subnet[domain_ids]
optional , nil allowed

Domains in which this subnet is part

Validations:

  • Must be an array of any type

subnet[dhcp_id]
optional , nil allowed

DHCP Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[tftp_id]
optional , nil allowed

TFTP Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[httpboot_id]
optional , nil allowed

HTTPBoot Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[externalipam_id]
optional , nil allowed

External IPAM Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[dns_id]
optional , nil allowed

DNS Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[template_id]
optional , nil allowed

Template HTTP(S) Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[bmc_id]
optional , nil allowed

BMC Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[boot_mode]
optional , nil allowed

Default boot mode for interfaces assigned to this subnet.

Validations:

  • Must be one of: Static, DHCP.

subnet[subnet_parameters_attributes]
optional , nil allowed

Array of parameters (name, value)

Validations:

  • Must be an array of any type

subnet[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

subnet[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


DELETE /api/subnets/:id
Delete a subnet

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Subnet numeric identifier

Validations:

  • Must be a number.


GET /api/subnets/:id/freeip
Provides an unused IP address in this subnet

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

mac
optional

MAC address to reuse the IP for this host

Validations:

  • String

excluded_ips
optional

IP addresses that should be excluded from suggestion

Validations:

  • Must be an array of any type