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

参数

参数名字 描述
domain_id
选填

ID of domain

Validations:

  • Must be String

location_id
选填

Scope by locations

Validations:

  • Must be Integer

organization_id
选填

Scope by organizations

Validations:

  • Must be Integer

search
选填

过滤结果

Validations:

  • Must be String

order
选填

结果排序

Validations:

  • Must be String

page
选填

页数

Validations:

  • Must be String

per_page
选填

每个请求中的条目数

Validations:

  • Must be String


GET /api/subnets/:id
Show a subnet

参数

参数名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/subnets
Create a subnet

参数

参数名字 描述
subnet
必填

Validations:

  • Must be a Hash

subnet[name]
必填

子网名

Validations:

  • Must be String

subnet[network]
必填

Subnet network

Validations:

  • Must be String

subnet[mask]
必填

子网掩码

Validations:

  • Must be String

subnet[gateway]
选填 , 允许空值

Primary DNS for this subnet

Validations:

  • Must be String

subnet[dns_primary]
选填 , 允许空值

Primary DNS for this subnet

Validations:

  • Must be String

subnet[dns_secondary]
选填 , 允许空值

Secondary DNS for this subnet

Validations:

  • Must be String

subnet[ipam]
选填 , 允许空值

IP Address auto suggestion mode for this subnet, valid values are “DHCP”, “Internal DB”, “None”

Validations:

  • Must be String

subnet[from]
选填 , 允许空值

Starting IP Address for IP auto suggestion

Validations:

  • Must be String

subnet[to]
选填 , 允许空值

Ending IP Address for IP auto suggestion

Validations:

  • Must be String

subnet[vlanid]
选填 , 允许空值

VLAN ID for this subnet

Validations:

  • Must be String

subnet[domain_ids]
选填 , 允许空值

该部分子网的域名

Validations:

  • Must be an array of any type

subnet[dhcp_id]
选填 , 允许空值

本子网使用的DHCP代理

Validations:

  • Must be a number.

subnet[tftp_id]
选填 , 允许空值

TFTP Proxy to use within this subnet

Validations:

  • Must be a number.

subnet[dns_id]
选填 , 允许空值

本子网使用的域名代理

Validations:

  • Must be a number.

subnet[boot_mode]
选填 , 允许空值

Default boot mode for interfaces assigned to this subnet, valid values are “Static”, “DHCP”

Validations:

  • Must be String

subnet[subnet_parameters_attributes]
选填 , 允许空值

Array of parameters (name, value)

Validations:

  • Must be an array of any type

subnet[location_ids]
选填 , 允许空值

REPLACE locations with given ids

Validations:

  • Must be an array of any type

subnet[organization_ids]
选填 , 允许空值

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/subnets/:id
Update a subnet

参数

参数名字 描述
id
必填

Subnet numeric identifier

Validations:

  • Must be a number.

subnet
必填

Validations:

  • Must be a Hash

subnet[name]
选填

子网名

Validations:

  • Must be String

subnet[network]
选填

Subnet network

Validations:

  • Must be String

subnet[mask]
选填

子网掩码

Validations:

  • Must be String

subnet[gateway]
选填 , 允许空值

Primary DNS for this subnet

Validations:

  • Must be String

subnet[dns_primary]
选填 , 允许空值

Primary DNS for this subnet

Validations:

  • Must be String

subnet[dns_secondary]
选填 , 允许空值

Secondary DNS for this subnet

Validations:

  • Must be String

subnet[ipam]
选填 , 允许空值

IP Address auto suggestion mode for this subnet, valid values are “DHCP”, “Internal DB”, “None”

Validations:

  • Must be String

subnet[from]
选填 , 允许空值

Starting IP Address for IP auto suggestion

Validations:

  • Must be String

subnet[to]
选填 , 允许空值

Ending IP Address for IP auto suggestion

Validations:

  • Must be String

subnet[vlanid]
选填 , 允许空值

VLAN ID for this subnet

Validations:

  • Must be String

subnet[domain_ids]
选填 , 允许空值

该部分子网的域名

Validations:

  • Must be an array of any type

subnet[dhcp_id]
选填 , 允许空值

本子网使用的DHCP代理

Validations:

  • Must be a number.

subnet[tftp_id]
选填 , 允许空值

TFTP Proxy to use within this subnet

Validations:

  • Must be a number.

subnet[dns_id]
选填 , 允许空值

本子网使用的域名代理

Validations:

  • Must be a number.

subnet[boot_mode]
选填 , 允许空值

Default boot mode for interfaces assigned to this subnet, valid values are “Static”, “DHCP”

Validations:

  • Must be String

subnet[subnet_parameters_attributes]
选填 , 允许空值

Array of parameters (name, value)

Validations:

  • Must be an array of any type

subnet[location_ids]
选填 , 允许空值

REPLACE locations with given ids

Validations:

  • Must be an array of any type

subnet[organization_ids]
选填 , 允许空值

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


DELETE /api/subnets/:id
Delete a subnet

参数

参数名字 描述
id
必填

Subnet numeric identifier

Validations:

  • Must be a number.