GET /api/hosts
List all hosts.

Parámetros

Nombre del parámetro Descripción
search
opcional

Filter results

Validations:

  • Must be a String

order
opcional

Sort results

Validations:

  • Must be a String

page
opcional

paginar resultados

Validations:

  • Must be a String

per_page
opcional

número de entradas por solicitud

Validations:

  • Must be a String


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

Parámetros

Nombre del parámetro Descripción
id
requerido

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.

Parámetros

Nombre del parámetro Descripción
host
requerido

Validations:

  • Must be a Hash

host[name]
requerido

Validations:

  • Must be a String

host[location_id]
requerido

obligatorio si las ubicaciones están activadas

Validations:

  • Must be a number.

host[organization_id]
requerido

obligatorio si las organizaciones están activadas

Validations:

  • Must be a number.

host[environment_id]
opcional

obligatorio si los hosts están administrados y el valor no se ha heredado de un grupo de hosts

Validations:

  • Must be a String

host[ip]
opcional

Dirección IPv4

Validations:

  • Must be a String

host[ip6]
opcional

Dirección IPv6

Validations:

  • Must be a String

host[mac]
opcional

obligatorio para hosts administrados bare metal, no se requiere para máquinas virtuales

Validations:

  • Must be a String

host[architecture_id]
opcional

obligatorio si los hosts están administrados y el valor no se ha heredado de un grupo de hosts

Validations:

  • Must be a number.

host[domain_id]
opcional

obligatorio si los hosts están administrados y el valor no se ha heredado de un grupo de hosts

Validations:

  • Must be a number.

host[realm_id]
opcional

Validations:

  • Must be a number.

host[puppet_proxy_id]
opcional

Validations:

  • Must be a number.

host[puppetclass_ids]
opcional

Validations:

  • Must be an array of any type

host[operatingsystem_id]
opcional

obligatorio si los hosts están administrados y el valor no se ha heredado de un grupo de hosts

Validations:

  • Must be a String

host[medium_id]
opcional

obligatorio si el aprovisionamiento no se basa en imágenes, el host está administrado y el valor no se hereda de un grupo de hosts

Validations:

  • Must be a String

host[pxe_loader]
opcional

Opción de nombre de archivo DHCP

Validations:

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

host[ptable_id]
opcional

obligatorio si el host está administrado y no se han definido particiones personalizadas

Validations:

  • Must be a number.

host[subnet_id]
opcional

IPv4 subnet

Validations:

  • Must be a number.

host[subnet6_id]
opcional

IPv6 subnet

Validations:

  • Must be a number.

host[compute_resource_id]
opcional

nil implica que el host es bare metal

Validations:

  • Must be a number.

host[root_pass]
opcional

obligatorio si el host está administrado y el valor no se hereda de un grupo de hosts o contraseñas predeterminadas en parámetros

Validations:

  • Must be a String

host[model_id]
opcional

Validations:

  • Must be a number.

host[hostgroup_id]
opcional

Validations:

  • Must be a number.

host[owner_id]
opcional

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
opcional

Validations:

  • Must be a number.

host[image_id]
opcional

Validations:

  • Must be a number.

host[host_parameters_attributes]
opcional

Parámetros del host (array o hash indexado)

Validations:

  • Must be an Array of nested elements

host[host_parameters_attributes][name]
requerido

Nombre del parámetro

Validations:

  • Must be a String

host[host_parameters_attributes][value]
requerido

Valor del parámetro

Validations:

  • Must be a String

host[build]
opcional

Validations:

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

host[enabled]
opcional

Incluir este host en el informe de Foreman

Validations:

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

host[provision_method]
opcional

Validations:

  • Must be a String

host[managed]
opcional

Indicador verdadero/falso que indica si el host es administradoo no. Nota: este valor también determina si ciertos parámetros son obligatorios.

Validations:

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

host[progress_report_id]
opcional

UUID para seguir el estado de la tarea de orquestación, GET /api/orchestration/:UUID/tasks

Validations:

  • Must be a String

host[comment]
opcional

Información adicional sobre este host

Validations:

  • Must be a String

host[capabilities]
opcional

Validations:

  • Must be a String

host[compute_profile_id]
opcional

Validations:

  • Must be a number.

host[compute_attributes]
opcional

Validations:

  • Must be a Hash


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

Parámetros

Nombre del parámetro Descripción
id
requerido

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
requerido

Validations:

  • Must be a Hash

host[name]
opcional

Validations:

  • Must be a String

host[environment_id]
opcional

Validations:

  • Must be a String

host[ip]
opcional

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

Validations:

  • Must be a String

host[ip6]
opcional

Dirección IPv6

Validations:

  • Must be a String

host[mac]
opcional

not required if its a virtual machine

Validations:

  • Must be a String

host[architecture_id]
opcional

Validations:

  • Must be a number.

host[domain_id]
opcional

Validations:

  • Must be a number.

host[puppet_proxy_id]
opcional

Validations:

  • Must be a number.

host[operatingsystem_id]
opcional

Validations:

  • Must be a String

host[puppetclass_ids]
opcional

Validations:

  • Must be an array of any type

host[medium_id]
opcional

Validations:

  • Must be a number.

host[ptable_id]
opcional

Validations:

  • Must be a number.

host[subnet_id]
opcional

IPv4 subnet

Validations:

  • Must be a number.

host[subnet6_id]
opcional

IPv6 subnet

Validations:

  • Must be a number.

host[compute_resource_id]
opcional

Validations:

  • Must be a number.

host[sp_subnet_id]
opcional

Validations:

  • Must be a number.

host[model_id]
opcional

Validations:

  • Must be a number.

host[hostgroup_id]
opcional

Validations:

  • Must be a number.

host[owner_id]
opcional

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
opcional

Validations:

  • Must be a number.

host[image_id]
opcional

Validations:

  • Must be a number.

host[host_parameters_attributes]
opcional

Validations:

  • Must be an array of any type

host[build]
opcional

Validations:

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

host[enabled]
opcional

Validations:

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

host[provision_method]
opcional

Validations:

  • Must be a String

host[managed]
opcional

Validations:

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

host[progress_report_id]
opcional

UUID para seguir el estado de la tarea de orquestación, GET /api/orchestration/:UUID/tasks

Validations:

  • Must be a String

host[capabilities]
opcional

Validations:

  • Must be a String

host[compute_attributes]
opcional

Validations:

  • Must be a Hash


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

Parámetros

Nombre del parámetro Descripción
id
requerido

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
Estado del host

Return value may either be one of the following:

  • missing

  • failed

  • pending

  • changed

  • unchanged

  • unreported

Parámetros

Nombre del parámetro Descripción
id
requerido

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.