GET /api/register
Render Global registration template

Params

Param name Description
organization_id
optional

ID of the Organization to register the host in.

Validations:

  • Must be a number.

location_id
optional

ID of the Location to register the host in.

Validations:

  • Must be a number.

hostgroup_id
optional

ID of the Host group to register the host in.

Validations:

  • Must be a number.

operatingsystem_id
optional

ID of the Operating System to register the host in.

Validations:

  • Must be a number.


POST /api/register
Find or create a host and render the Host registration template

Params

Param name Description
name
required

Validations:

  • String

location_id
required

Validations:

  • Must be a number.

organization_id
required

Validations:

  • Must be a number.

ip
optional

IPv4 address, not required if using a subnet with DHCP proxy

Validations:

  • String

ip6
optional

IPv6 address, not required if using a subnet with DHCP proxy

Validations:

  • String

mac
optional

required for managed host that is bare metal, not required if it's a virtual machine

Validations:

  • String

domain_id
optional

required if host is managed and value is not inherited from host group

Validations:

  • Must be a number.

operatingsystem_id
optional

required if host is managed and value is not inherited from host group

Validations:

  • Must be a number.

subnet_id
optional

required if host is managed and value is not inherited from host group

Validations:

  • Must be a number.

model_id
optional

Validations:

  • Must be a number.

hostgroup_id
optional

Validations:

  • Must be a number.

host_parameters_attributes
optional

Host's parameters (array or indexed hash)

Validations:

  • Must be an Array of nested elements

host_parameters_attributes[name]
required

Name of the parameter

Validations:

  • String

host_parameters_attributes[value]
required

Parameter value

Validations:

  • String

host_parameters_attributes[parameter_type]
optional

Type of value

Validations:

  • Must be one of: string, boolean, integer, real, array, hash, yaml, json.

host_parameters_attributes[hidden_value]
optional

Validations:

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

build
optional

Validations:

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

enabled
optional

Include this host within Foreman reporting

Validations:

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

managed
optional

True/False flag whether a host is managed or unmanaged. Note: this value also determines whether several parameters are required or not

Validations:

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

comment
optional

Additional information about this host

Validations:

  • String

interfaces_attributes
optional

Host's network interfaces.

Validations:

  • Must be an Array of nested elements

interfaces_attributes[mac]
optional

MAC address of interface. Required for managed interfaces on bare metal.

Validations:

  • String

interfaces_attributes[ip]
optional

IPv4 address of interface

Validations:

  • String

interfaces_attributes[ip6]
optional

IPv6 address of interface

Validations:

  • String

interfaces_attributes[type]
optional

Interface type, e.g. bmc. Default is interface

Validations:

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

interfaces_attributes[name]
optional

Interface's DNS name

Validations:

  • String

interfaces_attributes[subnet_id]
optional

Foreman subnet ID of IPv4 interface

Validations:

  • Must be a number.

interfaces_attributes[subnet6_id]
optional

Foreman subnet ID of IPv6 interface

Validations:

  • Must be a number.

interfaces_attributes[domain_id]
optional

Foreman domain ID of interface. Required for primary interfaces on managed hosts.

Validations:

  • Must be a number.

interfaces_attributes[identifier]
optional

Device identifier, e.g. eth0 or eth1.1

Validations:

  • String

interfaces_attributes[managed]
optional

Should this interface be managed via DHCP and DNS smart proxy and should it be configured during provisioning?

Validations:

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

interfaces_attributes[primary]
optional

Should this interface be used for constructing the FQDN of the host? Each managed hosts needs to have one primary interface.

Validations:

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

interfaces_attributes[provision]
optional

Should this interface be used for TFTP of PXELinux (or SSH for image-based hosts)? Each managed hosts needs to have one provision interface.

Validations:

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

interfaces_attributes[username]
optional

Only for BMC interfaces.

Validations:

  • String

interfaces_attributes[password]
optional

Only for BMC interfaces.

Validations:

  • String

interfaces_attributes[provider]
optional

Interface provider, e.g. IPMI. Only for BMC interfaces.

Validations:

  • Must be one of: IPMI, SSH.

interfaces_attributes[virtual]
optional

Alias or VLAN device

Validations:

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

interfaces_attributes[tag]
optional

VLAN tag, this attribute has precedence over the subnet VLAN ID. Only for virtual interfaces.

Validations:

  • String

interfaces_attributes[mtu]
optional

MTU, this attribute has precedence over the subnet MTU.

Validations:

  • Integer

interfaces_attributes[attached_to]
optional

Identifier of the interface to which this interface belongs, e.g. eth1. Only for virtual interfaces.

Validations:

  • String

interfaces_attributes[mode]
optional

Bond mode of the interface, e.g. balance-rr. Only for bond interfaces.

Validations:

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

interfaces_attributes[attached_devices]
optional

Identifiers of attached interfaces, e.g. `['eth1', 'eth2']`. For bond interfaces those are the slaves. Only for bond and bridges interfaces.

Validations:

  • Must be an array of any type

interfaces_attributes[bond_options]
optional

Space separated options, e.g. miimon=100. Only for bond interfaces.

Validations:

  • String

interfaces_attributes[compute_attributes]
optional

Additional compute resource specific attributes for the interface.

Validations:

  • Hash

content_facet_attributes
optional

Parameters for host's content_facet facet

Validations:

  • Hash

content_facet_attributes[content_view_id]
optional

Validations:

  • Integer

content_facet_attributes[lifecycle_environment_id]
optional

Validations:

  • Integer

content_facet_attributes[content_source_id]
optional

Validations:

  • Integer

content_facet_attributes[kickstart_repository_id]
optional

Repository Id associated with the kickstart repo used for provisioning

Validations:

  • Integer

subscription_facet_attributes
optional

Parameters for host's subscription_facet facet

Validations:

  • Hash

subscription_facet_attributes[release_version]
optional

Release version for this Host to use (7Server, 7.1, etc)

Validations:

  • String

subscription_facet_attributes[autoheal]
optional

Sets whether the Host will autoheal subscriptions upon checkin

Validations:

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

subscription_facet_attributes[purpose_usage]
optional

Sets the system purpose usage

Validations:

  • String

subscription_facet_attributes[purpose_role]
optional

Sets the system purpose usage

Validations:

  • String

subscription_facet_attributes[purpose_addons]
optional

Sets the system add-ons

Validations:

  • Must be an array of any type

subscription_facet_attributes[service_level]
optional

Service level to be used for autoheal

Validations:

  • String

subscription_facet_attributes[hypervisor_guest_uuids]
optional

List of hypervisor guest uuids

Validations:

  • Must be an array of any type

subscription_facet_attributes[installed_products_attributes]
optional

List of products installed on the host

Validations:

  • Must be an Array of nested elements

subscription_facet_attributes[installed_products_attributes][product_id]
optional

Product id as listed from a host's installed products, this is not the same product id as the products api returns

Validations:

  • String

subscription_facet_attributes[installed_products_attributes][product_name]
optional

Product name as listed from a host's installed products

Validations:

  • String

subscription_facet_attributes[installed_products_attributes][arch]
optional

Product architecture

Validations:

  • String

subscription_facet_attributes[installed_products_attributes][version]
optional

Product version

Validations:

  • String