GET /api/hosts
List all hosts.

Params

Param name Description
search
optional

Filter results

Validations:

  • Must be a String

order
optional

Sort results

Validations:

  • Must be a String

page
optional

paginate results

Validations:

  • Must be a String

per_page
optional

antal poster per begäran

Validations:

  • Must be a String


GET /api/hosts/:id
Show a host.

Params

Param name Description
id
required

Validations:

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


POST /api/hosts
Create a host.

Params

Param name Description
host
required

Validations:

  • Must be a Hash

host[name]
required

Validations:

  • Must be a String

host[location_id]
required

required if locations are enabled

Validations:

  • Must be a number.

host[organization_id]
required

required if organizations are enabled

Validations:

  • Must be a number.

host[environment_id]
optional

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

Validations:

  • Must be a String

host[ip]
optional

IPv4 address

Validations:

  • Must be a String

host[ip6]
optional

IPv6 address

Validations:

  • Must be a String

host[mac]
optional

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

Validations:

  • Must be a String

host[architecture_id]
optional

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

Validations:

  • Must be a number.

host[domain_id]
optional

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

Validations:

  • Must be a number.

host[realm_id]
optional

Validations:

  • Must be a number.

host[puppet_proxy_id]
optional

Validations:

  • Must be a number.

host[puppetclass_ids]
optional

Validations:

  • Must be an array of any type

host[operatingsystem_id]
optional

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

Validations:

  • Must be a String

host[medium_id]
optional

required if not imaged based provisioning and host is managed and value is not inherited from host group

Validations:

  • Must be a String

host[pxe_loader]
optional

DHCP filename option

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub2 UEFI, Grub2 UEFI SecureBoot.

host[ptable_id]
optional

required if host is managed and custom partition has not been defined

Validations:

  • Must be a number.

host[subnet_id]
optional

IPv4 subnet

Validations:

  • Must be a number.

host[subnet6_id]
optional

IPv6 subnet

Validations:

  • Must be a number.

host[compute_resource_id]
optional

nil means host is bare metal

Validations:

  • Must be a number.

host[root_pass]
optional

required if host is managed and value is not inherited from host group or default password in settings

Validations:

  • Must be a String

host[model_id]
optional

Validations:

  • Must be a number.

host[hostgroup_id]
optional

Validations:

  • Must be a number.

host[owner_id]
optional

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
optional

Validations:

  • Must be a number.

host[image_id]
optional

Validations:

  • Must be a number.

host[host_parameters_attributes]
optional

Host's parameters (array or indexed hash)

Validations:

  • Must be an Array of nested elements

host[host_parameters_attributes][name]
required

Parameterns namn

Validations:

  • Must be a String

host[host_parameters_attributes][value]
required

Parametervärde

Validations:

  • Must be a String

host[build]
optional

Validations:

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

host[enabled]
optional

Inkludera denna värd inom Foremanrapportering

Validations:

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

host[provision_method]
optional

Validations:

  • Must be a String

host[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

host[progress_report_id]
optional

UUID to track orchestration tasks status, GET /api/orchestration/:UUID/tasks

Validations:

  • Must be a String

host[comment]
optional

Ytterligare information om värden

Validations:

  • Must be a String

host[capabilities]
optional

Validations:

  • Must be a String

host[compute_profile_id]
optional

Validations:

  • Must be a number.

host[compute_attributes]
optional

Validations:

  • Must be a Hash


PUT /api/hosts/:id
Update a host.

Params

Param name Description
id
required

Validations:

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

host
required

Validations:

  • Must be a Hash

host[name]
optional

Validations:

  • Must be a String

host[environment_id]
optional

Validations:

  • Must be a String

host[ip]
optional

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

Validations:

  • Must be a String

host[ip6]
optional

IPv6 address

Validations:

  • Must be a String

host[mac]
optional

not required if its a virtual machine

Validations:

  • Must be a String

host[architecture_id]
optional

Validations:

  • Must be a number.

host[domain_id]
optional

Validations:

  • Must be a number.

host[puppet_proxy_id]
optional

Validations:

  • Must be a number.

host[operatingsystem_id]
optional

Validations:

  • Must be a String

host[puppetclass_ids]
optional

Validations:

  • Must be an array of any type

host[medium_id]
optional

Validations:

  • Must be a number.

host[ptable_id]
optional

Validations:

  • Must be a number.

host[subnet_id]
optional

IPv4 subnet

Validations:

  • Must be a number.

host[subnet6_id]
optional

IPv6 subnet

Validations:

  • Must be a number.

host[compute_resource_id]
optional

Validations:

  • Must be a number.

host[sp_subnet_id]
optional

Validations:

  • Must be a number.

host[model_id]
optional

Validations:

  • Must be a number.

host[hostgroup_id]
optional

Validations:

  • Must be a number.

host[owner_id]
optional

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
optional

Validations:

  • Must be a number.

host[image_id]
optional

Validations:

  • Must be a number.

host[host_parameters_attributes]
optional

Validations:

  • Must be an array of any type

host[build]
optional

Validations:

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

host[enabled]
optional

Validations:

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

host[provision_method]
optional

Validations:

  • Must be a String

host[managed]
optional

Validations:

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

host[progress_report_id]
optional

UUID to track orchestration tasks status, GET /api/orchestration/:UUID/tasks

Validations:

  • Must be a String

host[capabilities]
optional

Validations:

  • Must be a String

host[compute_attributes]
optional

Validations:

  • Must be a Hash


DELETE /api/hosts/:id
Delete an host.

Params

Param name Description
id
required

Validations:

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


GET /api/hosts/:id/status
Hämta status för värd

Return value may either be one of the following:

  • missing

  • failed

  • pending

  • changed

  • unchanged

  • unreported

Params

Param name Description
id
required

Validations:

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