Examples

PUT /api/subnets/1018350799
{
  "subnet": {
    "subnet_parameters_attributes": [
      {
        "name": "new_key",
        "value": "new_value"
      }
    ]
  }
}
200
{
  "network": "6.79.236.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": "2019-09-11 14:46:34 UTC",
  "updated_at": "2019-09-11 14:46:34 UTC",
  "ipam": "None",
  "boot_mode": "DHCP",
  "id": 1018350799,
  "name": "subnet239",
  "description": null,
  "network_address": "6.79.236.0/24",
  "dhcp_id": null,
  "dhcp_name": null,
  "tftp_id": null,
  "tftp_name": null,
  "httpboot_id": null,
  "httpboot_name": null,
  "dns_id": null,
  "template_id": null,
  "template_name": null,
  "dhcp": null,
  "tftp": null,
  "httpboot": null,
  "dns": null,
  "template": null,
  "domains": [],
  "interfaces": [],
  "parameters": [
    {
      "priority": 40,
      "created_at": "2019-09-11 14:46:34 UTC",
      "updated_at": "2019-09-11 14:46:34 UTC",
      "id": 767575243,
      "name": "new_key",
      "parameter_type": null,
      "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
    }
  ]
}

Params

Param Name Description
location_id
Optional

Scope met locaties

Validations:

  • Must be a Integer

organization_id
Optional

Scope met organisaties

Validations:

  • Must be a Integer

id
Required

Subnet numerieke identifier

Validations:

  • Must be a number.

subnet
Required

Validations:

  • Must be a Hash

subnet[name]
Optional

Subnet naam

Validations:

  • Must be a String

subnet[description]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Subnet beschrijving

Validations:

  • Must be a String

subnet[network_type]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Type of protocol, IPv4 of IPV6, standaard is IPv4

Validations:

  • Must be one of: IPv4, IPv6.

subnet[network]
Optional

Subnet netwerk

Validations:

  • Must be a String

subnet[mask]
Optional

Netmask voor dit subnet

Validations:

  • Must be a String

subnet[gateway]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Subnet gateway

Validations:

  • Must be a String

subnet[dns_primary]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Primaire DNS voor dit subnet

Validations:

  • Must be a String

subnet[dns_secondary]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Secundaire DNS voor dit subnet

Validations:

  • Must be a String

subnet[ipam]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

IP Adres auto voorstel mode voor dit subnet, valide waarden zijn “DHCP”, “Internal DB”, “None”

Validations:

  • Must be a String

subnet[from]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Eerste IP adres voor IP auto voorstel

Validations:

  • Must be a String

subnet[to]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Laatste IP adres voor IP auto voorstel

Validations:

  • Must be a String

subnet[vlanid]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

VLAN ID voor dit subnet

Validations:

  • Must be a String

subnet[mtu]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

MTU for this subnet

Validations:

  • Must be a Integer

subnet[domain_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Domeinen waar dit dubnet deel van uitmaakt

Validations:

  • Must be an array of any type

subnet[dhcp_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

DHCP Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[tftp_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

TFTP Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[httpboot_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

HTTPBoot Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[dns_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

DNS Proxy ID to use within this subnet

Validations:

  • Must be a number.

subnet[template_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

  • Must be a number.

subnet[boot_mode]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Standaard boot mode voor interfaces toegekend aan dit subnet, valide waarden zijn “Static”, “DHCP”

Validations:

  • Must be a String

subnet[subnet_parameters_attributes]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Array van parameters (naam, waarde)

Validations:

  • Must be an array of any type

subnet[location_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Vervang locaties met de opgegeven ids

Validations:

  • Must be an array of any type

subnet[organization_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Vervang organisaties met de opgegeven ids.

Validations:

  • Must be an array of any type