GET /api/subnets 200 { "total": 7, "subtotal": 7, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "network": "2.3.4.0", "network_type": "IPv4", "cidr": 24, "mask": "255.255.255.0", "priority": null, "vlanid": 41, "mtu": 1500, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:23:22 UTC", "updated_at": "2021-05-18 16:23:22 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": null, "id": 980190962, "name": "one", "description": null, "network_address": "2.3.4.0/24", "dhcp_id": 980190962, "dhcp_name": "DHCP Proxy", "tftp_id": 298486374, "tftp_name": "TFTP Proxy", "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": 113629430, "template_id": null, "template_name": null, "bmc_id": 821748566, "bmc_name": "BMC proxy", "dhcp": { "name": "DHCP Proxy", "id": 980190962, "url": "https://somewhere.net:8443" }, "tftp": { "name": "TFTP Proxy", "id": 298486374, "url": "http://somewhere.else" }, "httpboot": null, "externalipam": null, "dns": { "name": "DNS Proxy", "id": 113629430, "url": "http://else.where:45671" }, "template": null, "bmc": { "name": "BMC proxy", "id": 821748566, "url": "http://else.where:45673" } }, { "network": "3.3.4.0", "network_type": "IPv4", "cidr": 24, "mask": "255.255.255.0", "priority": null, "vlanid": 42, "mtu": 1496, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:23:22 UTC", "updated_at": "2021-05-18 16:23:22 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": 3, "id": 298486374, "name": "two", "description": null, "network_address": "3.3.4.0/24", "dhcp_id": 980190962, "dhcp_name": "DHCP Proxy", "tftp_id": 298486374, "tftp_name": "TFTP Proxy", "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": null, "template_id": null, "template_name": null, "bmc_id": null, "bmc_name": null, "dhcp": { "name": "DHCP Proxy", "id": 980190962, "url": "https://somewhere.net:8443" }, "tftp": { "name": "TFTP Proxy", "id": 298486374, "url": "http://somewhere.else" }, "httpboot": null, "externalipam": null, "dns": null, "template": null, "bmc": null }, { "network": "3.3.4.3", "network_type": "IPv4", "cidr": 24, "mask": "255.255.255.0", "priority": null, "vlanid": 43, "mtu": 1500, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:23:22 UTC", "updated_at": "2021-05-18 16:23:22 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": null, "id": 113629430, "name": "three", "description": null, "network_address": "3.3.4.3/24", "dhcp_id": 980190962, "dhcp_name": "DHCP Proxy", "tftp_id": 298486374, "tftp_name": "TFTP Proxy", "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": null, "template_id": null, "template_name": null, "bmc_id": null, "bmc_name": null, "dhcp": { "name": "DHCP Proxy", "id": 980190962, "url": "https://somewhere.net:8443" }, "tftp": { "name": "TFTP Proxy", "id": 298486374, "url": "http://somewhere.else" }, "httpboot": null, "externalipam": null, "dns": null, "template": null, "bmc": null }, { "network": "3.3.5.0", "network_type": "IPv4", "cidr": 24, "mask": "255.255.255.0", "priority": null, "vlanid": 44, "mtu": 9000, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:23:22 UTC", "updated_at": "2021-05-18 16:23:22 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": null, "id": 281110143, "name": "four", "description": null, "network_address": "3.3.5.0/24", "dhcp_id": null, "dhcp_name": null, "tftp_id": 298486374, "tftp_name": "TFTP Proxy", "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": null, "template_id": null, "template_name": null, "bmc_id": null, "bmc_name": null, "dhcp": null, "tftp": { "name": "TFTP Proxy", "id": 298486374, "url": "http://somewhere.else" }, "httpboot": null, "externalipam": null, "dns": null, "template": null, "bmc": null }, { "network": "2001:db10:7::", "network_type": "IPv6", "cidr": 64, "mask": "ffff:ffff:ffff:ffff::", "priority": null, "vlanid": 44, "mtu": 9000, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:23:22 UTC", "updated_at": "2021-05-18 16:23:22 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": null, "id": 374648174, "name": "seven", "description": null, "network_address": "2001:db10:7::/64", "dhcp_id": null, "dhcp_name": null, "tftp_id": null, "tftp_name": null, "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": 113629430, "template_id": null, "template_name": null, "bmc_id": null, "bmc_name": null, "dhcp": null, "tftp": null, "httpboot": null, "externalipam": null, "dns": { "name": "DNS Proxy", "id": 113629430, "url": "http://else.where:45671" }, "template": null, "bmc": null }, { "network": "2001:db10::", "network_type": "IPv6", "cidr": 64, "mask": "ffff:ffff:ffff:ffff::", "priority": null, "vlanid": null, "mtu": 1500, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:23:22 UTC", "updated_at": "2021-05-18 16:23:22 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": null, "id": 51848956, "name": "six", "description": null, "network_address": "2001:db10::/64", "dhcp_id": null, "dhcp_name": null, "tftp_id": null, "tftp_name": null, "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": 113629430, "template_id": null, "template_name": null, "bmc_id": null, "bmc_name": null, "dhcp": null, "tftp": null, "httpboot": null, "externalipam": null, "dns": { "name": "DNS Proxy", "id": 113629430, "url": "http://else.where:45671" }, "template": null, "bmc": null }, { "network": "10.0.0.0", "network_type": "IPv4", "cidr": 24, "mask": "255.255.255.0", "priority": null, "vlanid": null, "mtu": 1500, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:23:22 UTC", "updated_at": "2021-05-18 16:23:22 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": null, "id": 1018350795, "name": "five", "description": null, "network_address": "10.0.0.0/24", "dhcp_id": 980190962, "dhcp_name": "DHCP Proxy", "tftp_id": 298486374, "tftp_name": "TFTP Proxy", "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": 113629430, "template_id": null, "template_name": null, "bmc_id": 821748566, "bmc_name": "BMC proxy", "dhcp": { "name": "DHCP Proxy", "id": 980190962, "url": "https://somewhere.net:8443" }, "tftp": { "name": "TFTP Proxy", "id": 298486374, "url": "http://somewhere.else" }, "httpboot": null, "externalipam": null, "dns": { "name": "DNS Proxy", "id": 113629430, "url": "http://else.where:45671" }, "template": null, "bmc": { "name": "BMC proxy", "id": 821748566, "url": "http://else.where:45673" } } ] }
Param name | Description |
---|---|
domain_id optional |
ID of domain Validations:
|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
search optional |
filter results Validations:
|
order optional |
Sort field and order, eg. ‘id DESC’ Validations:
|
page optional |
Page number, starting at 1 Validations:
|
per_page optional |
Number of results per page to return, ‘all’ to return all results Validations:
|
Field name | Type | Possible values |
---|---|---|
boot_mode | string | |
dns_primary | string | |
dns_secondary | string | |
domain | string | |
gateway | string | |
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/1018350797 200 { "network": "252.42.54.0", "network_type": "IPv4", "cidr": 24, "mask": "255.255.255.0", "priority": null, "vlanid": null, "mtu": 1500, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:19:38 UTC", "updated_at": "2021-05-18 16:19:38 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": null, "id": 1018350797, "name": "subnet403", "description": null, "network_address": "252.42.54.0/24", "dhcp_id": null, "dhcp_name": null, "tftp_id": null, "tftp_name": null, "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": null, "template_id": null, "template_name": null, "bmc_id": null, "bmc_name": null, "dhcp": null, "tftp": null, "httpboot": null, "externalipam": null, "dns": null, "template": null, "bmc": null, "domains": [], "interfaces": [], "parameters": [ { "priority": 40, "created_at": "2021-05-18 16:19:38 UTC", "updated_at": "2021-05-18 16:19:38 UTC", "id": 767575239, "name": "foo", "parameter_type": "string", "value": "*****" } ], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [ { "id": 447626438, "name": "Organization 1", "title": "Organization 1", "description": null } ] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
show_hidden_parameters optional |
Display hidden parameter values Validations:
|
POST /api/subnets { "subnet": { "name": "QA2", "network_type": "IPv4", "network": "10.35.2.27", "mask": "255.255.255.0", "subnet_parameters_attributes": [ { "name": "hEGCThtDwv,QZoI77ZI6U,訅斺湛钊瀦疞斐嶧獭桄,ҀВҶаѮҖѬӽҀӅ,<h3>vxuOTBUKBR</h3>,ýÅüÐÄÙÏîþé,8431748002,볪𦤒ⲵ𢔣𣶬𪿈疞𥽬ꏲ㲃,_{]{-?!,|[", "value": "bar" } ] } } 201 { "network": "10.35.2.27", "network_type": "IPv4", "cidr": 24, "mask": "255.255.255.0", "priority": null, "vlanid": null, "mtu": 1500, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:23:24 UTC", "updated_at": "2021-05-18 16:23:24 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": null, "id": 1018350800, "name": "QA2", "description": null, "network_address": "10.35.2.27/24", "dhcp_id": null, "dhcp_name": null, "tftp_id": null, "tftp_name": null, "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": null, "template_id": null, "template_name": null, "bmc_id": null, "bmc_name": null, "dhcp": null, "tftp": null, "httpboot": null, "externalipam": null, "dns": null, "template": null, "bmc": null, "domains": [], "interfaces": [], "parameters": [ { "priority": 40, "created_at": "2021-05-18 16:23:24 UTC", "updated_at": "2021-05-18 16:23:24 UTC", "id": 767575245, "name": "hEGCThtDwv,QZoI77ZI6U,訅斺湛钊瀦疞斐嶧獭桄,ҀВҶаѮҖѬӽҀӅ,<h3>vxuOTBUKBR</h3>,ýÅüÐÄÙÏîþé,8431748002,볪𦤒ⲵ𢔣𣶬𪿈疞𥽬ꏲ㲃,_{]{-?!,|[", "parameter_type": "string", "value": "bar" } ], "locations": [], "organizations": [] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
subnet required |
Validations:
|
subnet[name] required |
Subnet name Validations:
|
subnet[description] optional , nil allowed |
Subnet description Validations:
|
subnet[network_type] optional , nil allowed |
Type or protocol, IPv4 or IPv6, defaults to IPv4 Validations:
|
subnet[network] required |
Subnet network Validations:
|
subnet[cidr] optional , nil allowed |
Network prefix in CIDR notation Validations:
|
subnet[mask] optional , nil allowed |
Netmask for this subnet Validations:
|
subnet[gateway] optional , nil allowed |
Subnet gateway Validations:
|
subnet[dns_primary] optional , nil allowed |
Primary DNS for this subnet Validations:
|
subnet[dns_secondary] optional , nil allowed |
Secondary DNS for this subnet Validations:
|
subnet[ipam] optional , nil allowed |
IP Address auto suggestion mode for this subnet. Validations:
|
subnet[externalipam_group] optional , nil allowed |
External IPAM group - only relevant when IPAM is set to external Validations:
|
subnet[from] optional , nil allowed |
Starting IP Address for IP auto suggestion Validations:
|
subnet[to] optional , nil allowed |
Ending IP Address for IP auto suggestion Validations:
|
subnet[vlanid] optional , nil allowed |
VLAN ID for this subnet Validations:
|
subnet[mtu] optional , nil allowed |
MTU for this subnet Validations:
|
subnet[domain_ids] optional , nil allowed |
Domains in which this subnet is part Validations:
|
subnet[dhcp_id] optional , nil allowed |
DHCP Proxy ID to use within this subnet Validations:
|
subnet[tftp_id] optional , nil allowed |
TFTP Proxy ID to use within this subnet Validations:
|
subnet[httpboot_id] optional , nil allowed |
HTTPBoot Proxy ID to use within this subnet Validations:
|
subnet[externalipam_id] optional , nil allowed |
External IPAM Proxy ID to use within this subnet Validations:
|
subnet[dns_id] optional , nil allowed |
DNS Proxy ID to use within this subnet Validations:
|
subnet[template_id] optional , nil allowed |
Template HTTP(S) Proxy ID to use within this subnet Validations:
|
subnet[bmc_id] optional , nil allowed |
BMC Proxy ID to use within this subnet Validations:
|
subnet[boot_mode] optional , nil allowed |
Default boot mode for interfaces assigned to this subnet. Validations:
|
subnet[subnet_parameters_attributes] optional , nil allowed |
Array of parameters (name, value) Validations:
|
subnet[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
subnet[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
PUT /api/subnets/1018350796 { "subnet": { "subnet_parameters_attributes": [ { "name": "foo", "value": "new_value" } ] } } 200 { "network": "178.238.227.0", "network_type": "IPv4", "cidr": 24, "mask": "255.255.255.0", "priority": null, "vlanid": null, "mtu": 1500, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "created_at": "2021-05-18 16:23:23 UTC", "updated_at": "2021-05-18 16:23:23 UTC", "ipam": "None", "boot_mode": "DHCP", "nic_delay": null, "id": 1018350796, "name": "subnet429", "description": null, "network_address": "178.238.227.0/24", "dhcp_id": null, "dhcp_name": null, "tftp_id": null, "tftp_name": null, "httpboot_id": null, "httpboot_name": null, "externalipam_id": null, "externalipam_name": null, "dns_id": null, "template_id": null, "template_name": null, "bmc_id": null, "bmc_name": null, "dhcp": null, "tftp": null, "httpboot": null, "externalipam": null, "dns": null, "template": null, "bmc": null, "domains": [], "interfaces": [], "parameters": [ { "priority": 40, "created_at": "2021-05-18 16:23:23 UTC", "updated_at": "2021-05-18 16:23:23 UTC", "id": 767575239, "name": "foo", "parameter_type": "string", "value": "new_value" } ], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [ { "id": 447626438, "name": "Organization 1", "title": "Organization 1", "description": null } ] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Subnet numeric identifier Validations:
|
subnet required |
Validations:
|
subnet[name] optional |
Subnet name Validations:
|
subnet[description] optional , nil allowed |
Subnet description Validations:
|
subnet[network_type] optional , nil allowed |
Type or protocol, IPv4 or IPv6, defaults to IPv4 Validations:
|
subnet[network] optional |
Subnet network Validations:
|
subnet[cidr] optional , nil allowed |
Network prefix in CIDR notation Validations:
|
subnet[mask] optional , nil allowed |
Netmask for this subnet Validations:
|
subnet[gateway] optional , nil allowed |
Subnet gateway Validations:
|
subnet[dns_primary] optional , nil allowed |
Primary DNS for this subnet Validations:
|
subnet[dns_secondary] optional , nil allowed |
Secondary DNS for this subnet Validations:
|
subnet[ipam] optional , nil allowed |
IP Address auto suggestion mode for this subnet. Validations:
|
subnet[externalipam_group] optional , nil allowed |
External IPAM group - only relevant when IPAM is set to external Validations:
|
subnet[from] optional , nil allowed |
Starting IP Address for IP auto suggestion Validations:
|
subnet[to] optional , nil allowed |
Ending IP Address for IP auto suggestion Validations:
|
subnet[vlanid] optional , nil allowed |
VLAN ID for this subnet Validations:
|
subnet[mtu] optional , nil allowed |
MTU for this subnet Validations:
|
subnet[domain_ids] optional , nil allowed |
Domains in which this subnet is part Validations:
|
subnet[dhcp_id] optional , nil allowed |
DHCP Proxy ID to use within this subnet Validations:
|
subnet[tftp_id] optional , nil allowed |
TFTP Proxy ID to use within this subnet Validations:
|
subnet[httpboot_id] optional , nil allowed |
HTTPBoot Proxy ID to use within this subnet Validations:
|
subnet[externalipam_id] optional , nil allowed |
External IPAM Proxy ID to use within this subnet Validations:
|
subnet[dns_id] optional , nil allowed |
DNS Proxy ID to use within this subnet Validations:
|
subnet[template_id] optional , nil allowed |
Template HTTP(S) Proxy ID to use within this subnet Validations:
|
subnet[bmc_id] optional , nil allowed |
BMC Proxy ID to use within this subnet Validations:
|
subnet[boot_mode] optional , nil allowed |
Default boot mode for interfaces assigned to this subnet. Validations:
|
subnet[subnet_parameters_attributes] optional , nil allowed |
Array of parameters (name, value) Validations:
|
subnet[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
subnet[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
DELETE /api/subnets/980190962 { "subnet": {} } 200 { "id": 980190962, "network": "2.3.4.0", "mask": "255.255.255.0", "priority": null, "name": "one", "vlanid": 41, "created_at": "2021-05-18T16:23:22.496Z", "updated_at": "2021-05-18T16:23:22.496Z", "dhcp_id": 980190962, "tftp_id": 298486374, "gateway": null, "dns_primary": null, "dns_secondary": null, "from": null, "to": null, "dns_id": 113629430, "boot_mode": "DHCP", "ipam": "None", "description": null, "mtu": 1500, "template_id": null, "httpboot_id": null, "nic_delay": null, "externalipam_id": null, "externalipam_group": null, "bmc_id": 821748566, "to_label": "one (2.3.4.0/24)", "type": "Subnet::Ipv4" }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Subnet numeric identifier Validations:
|
GET /api/subnets/1018350796-subnet169/freeip 200 { "freeip": "192.168.2.10", "errors": {} }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
mac optional |
MAC address to reuse the IP for this host Validations:
|
excluded_ips optional |
IP addresses that should be excluded from suggestion Validations:
|