GET /api/hosts/:host_id/interfaces
Som alle interfaces voor een host op

GET /api/domains/:domain_id/interfaces
Som alle interfaces voor een domein op

GET /api/subnets/:subnet_id/interfaces
List all interfaces for subnet

Examples

GET /api/hosts/host368/interfaces
200
{
  "total": 3,
  "subtotal": 3,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "subnet_id": null,
      "subnet_name": null,
      "subnet6_id": null,
      "subnet6_name": null,
      "domain_id": null,
      "domain_name": null,
      "created_at": "2019-11-07 08:37:16 UTC",
      "updated_at": "2019-11-07 08:37:16 UTC",
      "managed": true,
      "identifier": null,
      "id": 53,
      "name": "host368",
      "ip": null,
      "ip6": null,
      "mac": null,
      "mtu": null,
      "fqdn": "host368",
      "primary": true,
      "provision": true,
      "type": "interface",
      "virtual": false
    },
    {
      "subnet_id": null,
      "subnet_name": null,
      "subnet6_id": null,
      "subnet6_name": null,
      "domain_id": null,
      "domain_name": null,
      "created_at": "2019-11-07 08:37:16 UTC",
      "updated_at": "2019-11-07 08:37:16 UTC",
      "managed": true,
      "identifier": "eth184",
      "id": 54,
      "name": null,
      "ip": "0.0.0.38",
      "ip6": null,
      "mac": "00:33:45:ab:00:4e",
      "mtu": null,
      "fqdn": null,
      "primary": false,
      "provision": false,
      "type": "interface",
      "virtual": false
    },
    {
      "subnet_id": null,
      "subnet_name": null,
      "subnet6_id": null,
      "subnet6_name": null,
      "domain_id": null,
      "domain_name": null,
      "created_at": "2019-11-07 08:37:16 UTC",
      "updated_at": "2019-11-07 08:37:16 UTC",
      "managed": true,
      "identifier": "eth185",
      "id": 55,
      "name": null,
      "ip": "0.0.0.39",
      "ip6": null,
      "mac": "00:33:45:ab:00:4f",
      "mtu": null,
      "fqdn": null,
      "primary": false,
      "provision": false,
      "type": "bond",
      "mode": "balance-rr",
      "attached_devices": "",
      "bond_options": "",
      "virtual": true
    }
  ]
}

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

host_id
Required

ID of naam van de host

Validations:

  • Must be a String

domain_id
Optional

ID of naam van het domein

Validations:

  • Must be a String

subnet_id
Optional

ID of naam van het subnet

Validations:

  • Must be a String

page
Optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
Optional

Number of results per page to return

Validations:

  • Must be a number.


GET /api/hosts/:host_id/interfaces/:id
Bekijk een interface voor de host

Examples

GET /api/hosts/host369/interfaces/57
200
{
  "subnet_id": null,
  "subnet_name": null,
  "subnet6_id": null,
  "subnet6_name": null,
  "domain_id": null,
  "domain_name": null,
  "created_at": "2019-11-07 08:37:16 UTC",
  "updated_at": "2019-11-07 08:37:16 UTC",
  "managed": true,
  "identifier": "eth186",
  "id": 57,
  "name": null,
  "ip": "0.0.0.40",
  "ip6": null,
  "mac": "00:33:45:ab:00:50",
  "mtu": null,
  "fqdn": null,
  "primary": false,
  "provision": false,
  "type": "interface",
  "virtual": false
}

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

host_id
Required

ID of naam van de host

Validations:

  • Must be a String

id
Required

ID of naam van de interface

Validations:

  • Must be a String


POST /api/hosts/:host_id/interfaces
Maak een interface op een host aan

Examples

POST /api/hosts/26/interfaces
{
  "interface": {
    "name": "谚喪駏篬庿濱麢鐨耼孞",
    "ip": "10.0.1.1",
    "mac": "AA:AA:AA:AA:AA:AA",
    "username": "foo",
    "password": "bar",
    "provider": "IPMI",
    "type": "bmc",
    "ip6": "2001:db8::1"
  }
}
422
{
  "error": {
    "id": null,
    "errors": {
      "name": [
        "hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"
      ]
    },
    "full_messages": [
      "Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"
    ]
  }
}

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

host_id
Required

ID of naam van de host

Validations:

  • Must be a String

interface
Required

interface informatie

Validations:

  • Must be a Hash

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

MAC adres van de interface. Verplicht voor managed interfaces op bare metal.

Validations:

  • Must be a String

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

IPv4 adres van de interface

Validations:

  • Must be a String

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

IPv6 adres van de interface

Validations:

  • Must be a String

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

Interface type, bijvoorbeeld bmc. Standaard is interface

Validations:

  • Must be one of: interface, bmc, bond, bridge.

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

Interface zijn DNS naam

Validations:

  • Must be a String

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

Foreman subnet ID of IPv4 interface

Validations:

  • Must be a number.

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

Foreman subnet ID of IPv6 interface

Validations:

  • Must be a number.

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

Foreman domein ID of interface. Verplicht voor de primaire interface op managed hosts.

Validations:

  • Must be a number.

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

Device identifier, bijvoorbeeld eth0 of eth1.1

Validations:

  • Must be a String

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

Moet deze interface gemanaged worden via DHCP en DNS smart proxy en moet hij geconfigureerd worden gedurende de uitrol?

Validations:

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

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

Moet deze interface gebruikt worden voor het opbouwen van de FQDN van de host? elke managed host moet een primaire interface hebben.

Validations:

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

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

Moet deze interface gebruikt worden voor TFTP of PXELinux (of SSH voor op image gebaseerde hosts)? Elke managed host moet verplicht een provision interface hebben.

Validations:

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

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

Alleen voor BMC interfaces

Validations:

  • Must be a String

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

Alleen voor BMC interfaces

Validations:

  • Must be a String

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

Interface provider, bijvoorbeeld IPMI. Alleen voor BMC Interfaces

Validations:

  • Must be one of: IPMI, SSH.

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

Alias of VLAN device

Validations:

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

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

VLAN Tag, dit attribuut heeft voorrang boven het subnet VLAN ID. Alleen voor virtuele interfaces.

Validations:

  • Must be a String

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

MTU, this attribute has precedence over the subnet MTU.

Validations:

  • Must be a Integer

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

Identifier van de interface waar deze interface bij hoort. Bijv. eth1 Alleen voor virtuele interfaces

Validations:

  • Must be a String

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

Bond mode van de interface, bijvoorbeeld balance-rr. Alleen voorbond interfaces

Validations:

  • Must be one of: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb.

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

Identifiers van de aangesloten interface, bijvoorbeeld ['eth1', 'eth2']. Voor bond interfaces zijn dit de slaves. Alleen voor vond en bridged interfaces

Validations:

  • Must be an array of any type

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

Door spatie gescheiden opties, bijvoorbeeld miimon=100. Alleen voor bond interfaces.

Validations:

  • Must be a String

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

Extra compute resource specifieke attributen voor de interface.

Validations:

  • Must be a Hash


PUT /api/hosts/:host_id/interfaces/:id
Wijzig een host zijn interface

Examples

PUT /api/hosts/host360/interfaces/30
{
  "interface": {
    "name": "test.foreman.com",
    "ip": "10.0.1.1",
    "mac": "AA:AA:AA:AA:AA:AA",
    "username": "foo",
    "password": "bar",
    "provider": "IPMI",
    "ip6": "2001:db8::1"
  }
}
200
{
  "subnet_id": null,
  "subnet_name": null,
  "subnet6_id": null,
  "subnet6_name": null,
  "domain_id": null,
  "domain_name": null,
  "created_at": "2019-11-07 08:37:15 UTC",
  "updated_at": "2019-11-07 08:37:15 UTC",
  "managed": true,
  "identifier": "eth169",
  "id": 30,
  "name": "test.foreman.com",
  "ip": "10.0.1.1",
  "ip6": "2001:db8::1",
  "mac": "aa:aa:aa:aa:aa:aa",
  "mtu": null,
  "fqdn": "test.foreman.com",
  "primary": false,
  "provision": false,
  "type": "interface",
  "virtual": false
}

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

host_id
Required

ID of naam van de host

Validations:

  • Must be a String

id
Required

ID van de interface

Validations:

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

interface
Required

interface informatie

Validations:

  • Must be a Hash

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

MAC adres van de interface. Verplicht voor managed interfaces op bare metal.

Validations:

  • Must be a String

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

IPv4 adres van de interface

Validations:

  • Must be a String

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

IPv6 adres van de interface

Validations:

  • Must be a String

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

Interface type, bijvoorbeeld bmc. Standaard is interface

Validations:

  • Must be one of: interface, bmc, bond, bridge.

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

Interface zijn DNS naam

Validations:

  • Must be a String

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

Foreman subnet ID of IPv4 interface

Validations:

  • Must be a number.

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

Foreman subnet ID of IPv6 interface

Validations:

  • Must be a number.

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

Foreman domein ID of interface. Verplicht voor de primaire interface op managed hosts.

Validations:

  • Must be a number.

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

Device identifier, bijvoorbeeld eth0 of eth1.1

Validations:

  • Must be a String

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

Moet deze interface gemanaged worden via DHCP en DNS smart proxy en moet hij geconfigureerd worden gedurende de uitrol?

Validations:

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

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

Moet deze interface gebruikt worden voor het opbouwen van de FQDN van de host? elke managed host moet een primaire interface hebben.

Validations:

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

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

Moet deze interface gebruikt worden voor TFTP of PXELinux (of SSH voor op image gebaseerde hosts)? Elke managed host moet verplicht een provision interface hebben.

Validations:

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

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

Alleen voor BMC interfaces

Validations:

  • Must be a String

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

Alleen voor BMC interfaces

Validations:

  • Must be a String

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

Interface provider, bijvoorbeeld IPMI. Alleen voor BMC Interfaces

Validations:

  • Must be one of: IPMI, SSH.

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

Alias of VLAN device

Validations:

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

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

VLAN Tag, dit attribuut heeft voorrang boven het subnet VLAN ID. Alleen voor virtuele interfaces.

Validations:

  • Must be a String

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

MTU, this attribute has precedence over the subnet MTU.

Validations:

  • Must be a Integer

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

Identifier van de interface waar deze interface bij hoort. Bijv. eth1 Alleen voor virtuele interfaces

Validations:

  • Must be a String

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

Bond mode van de interface, bijvoorbeeld balance-rr. Alleen voorbond interfaces

Validations:

  • Must be one of: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb.

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

Identifiers van de aangesloten interface, bijvoorbeeld ['eth1', 'eth2']. Voor bond interfaces zijn dit de slaves. Alleen voor vond en bridged interfaces

Validations:

  • Must be an array of any type

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

Door spatie gescheiden opties, bijvoorbeeld miimon=100. Alleen voor bond interfaces.

Validations:

  • Must be a String

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

Extra compute resource specifieke attributen voor de interface.

Validations:

  • Must be a Hash


DELETE /api/hosts/:host_id/interfaces/:id
Verwijder een host zijn interface

Examples

DELETE /api/hosts/32/interfaces/45
{
  "interface": {}
}
422
{
  "error": {
    "id": 45,
    "errors": {
      "primary": [
        "can't delete primary interface of managed host"
      ],
      "provision": [
        "can't delete provision interface of managed host"
      ]
    },
    "full_messages": [
      "Primary can't delete primary interface of managed host",
      "Provision can't delete provision interface of managed host"
    ]
  }
}

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

host_id
Required

ID of naam van de host

Validations:

  • Must be a String

id
Required

ID van de interface

Validations:

  • Must be a String