GET /api/subnets
子网列表

参数

参数名字 描述
search
选填

Filter results

Validations:

  • Must be String

order
选填

Sort results

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
创建子网

参数

参数名字 描述
subnet
必填

Validations:

  • Must be a Hash

subnet[name]
必填

子网名

Validations:

  • Must be String

subnet[network_type]
选填

Type or protocol, IPv4 or IPv6, defaults to IPv4

Validations:

  • Must be one of: IPv4, IPv6.

subnet[network]
必填

子网网络

Validations:

  • Must be String

subnet[mask]
必填

子网掩码

Validations:

  • Must be String

subnet[gateway]
选填

这个子网的主 DNS

Validations:

  • Must be String

subnet[dns_primary]
选填

这个子网的主 DNS

Validations:

  • Must be String

subnet[dns_secondary]
选填

这个子网的辅 DNS

Validations:

  • Must be String

subnet[ipam]
选填

Enable IP Address auto suggestion for this subnet

Validations:

  • Must be 'true' or 'false' or '1' or '0'

subnet[from]
选填

IP 自动提示的起始 IP 地址

Validations:

  • Must be String

subnet[to]
选填

为 IP 自动提示功能提供 IP 地址结尾

Validations:

  • Must be String

subnet[vlanid]
选填

这个子网的 VLAN ID

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 代理服务器

Validations:

  • Must be a number.

subnet[dns_id]
选填

本子网使用的 DNS 代理服务器

Validations:

  • Must be a number.


PUT /api/subnets/:id
更新子网

参数

参数名字 描述
id
必填

子网数字识别符

Validations:

  • Must be a number.

subnet
必填

Validations:

  • Must be a Hash

subnet[name]
选填

子网名

Validations:

  • Must be String

subnet[network]
选填

子网网络

Validations:

  • Must be String

subnet[mask]
选填

子网掩码

Validations:

  • Must be String

subnet[gateway]
选填 , 允许空值

这个子网的主 DNS

Validations:

  • Must be String

subnet[dns_primary]
选填 , 允许空值

这个子网的主 DNS

Validations:

  • Must be String

subnet[dns_secondary]
选填 , 允许空值

这个子网的辅 DNS

Validations:

  • Must be String

subnet[from]
选填 , 允许空值

IP 自动提示的起始 IP 地址

Validations:

  • Must be String

subnet[to]
选填 , 允许空值

Ending IP Address for IP auto suggestion

Validations:

  • Must be String

subnet[vlanid]
选填 , 允许空值

这个子网的 VLAN ID

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 代理服务器

Validations:

  • Must be a number.

subnet[dns_id]
选填 , 允许空值

本子网使用的 DNS 代理服务器

Validations:

  • Must be a number.


DELETE /api/subnets/:id
删除子网

参数

参数名字 描述
id
必填

子网数字识别符

Validations:

  • Must be a number.