GET /api/hosts
List all hosts.

Paramètres

Nom du paramètre Description
search
optionel

Filter results

Validations:

  • Must be a String

order
optionel

Sort results

Validations:

  • Must be a String

page
optionel

paginer les résultats

Validations:

  • Must be a String

per_page
optionel

nombre d'entier par requête

Validations:

  • Must be a String


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

Paramètres

Nom du paramètre Description
id
requis

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.

Paramètres

Nom du paramètre Description
host
requis

Validations:

  • Must be a Hash

host[name]
requis

Validations:

  • Must be a String

host[location_id]
requis

requis si les emplacements sont activés

Validations:

  • Must be a number.

host[organization_id]
requis

requis si les organisations sont activées

Validations:

  • Must be a number.

host[environment_id]
optionel

requis si l'hôte est géré et la valeur n'est pas héritée d'un groupe d'hôtes

Validations:

  • Must be a String

host[ip]
optionel

IPv4 address

Validations:

  • Must be a String

host[ip6]
optionel

IPv6 address

Validations:

  • Must be a String

host[mac]
optionel

requis pour les hôtes gérés qui sont des serveurs physiques, non requis pour les machines virtuelles

Validations:

  • Must be a String

host[architecture_id]
optionel

requis si l'hôte est géré et la valeur n'est pas héritée d'un groupe d'hôtes

Validations:

  • Must be a number.

host[domain_id]
optionel

requis si l'hôte est géré et la valeur n'est pas héritée d'un groupe d'hôtes

Validations:

  • Must be a number.

host[realm_id]
optionel

Validations:

  • Must be a number.

host[puppet_proxy_id]
optionel

Validations:

  • Must be a number.

host[puppetclass_ids]
optionel

Validations:

  • Must be an array of any type

host[operatingsystem_id]
optionel

requis si l'hôte est géré et la valeur n'est pas héritée d'un groupe d'hôtes

Validations:

  • Must be a String

host[medium_id]
optionel

requis si le provisioningn'est pas basé sur une image que l'hôte est géré et que la valeur n'est pas héritée d'un groupe d'hôtes

Validations:

  • Must be a String

host[pxe_loader]
optionel

option nom de fichier DHCP

Validations:

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

host[ptable_id]
optionel

requis si l'hôte est géré et possède une partition spécifique qui n'a pas été définie

Validations:

  • Must be a number.

host[subnet_id]
optionel

IPv4 subnet

Validations:

  • Must be a number.

host[subnet6_id]
optionel

IPv6 subnet

Validations:

  • Must be a number.

host[compute_resource_id]
optionel

nil signifie que l'hôte est un serveur physique

Validations:

  • Must be a number.

host[root_pass]
optionel

requis si l'hôte est gérer et la valeur n'est pas héritée d'un groupe d'hôtes ou du mot de passe par défaut défini dans les paramètres généraux

Validations:

  • Must be a String

host[model_id]
optionel

Validations:

  • Must be a number.

host[hostgroup_id]
optionel

Validations:

  • Must be a number.

host[owner_id]
optionel

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
optionel

Validations:

  • Must be a number.

host[image_id]
optionel

Validations:

  • Must be a number.

host[host_parameters_attributes]
optionel

Paramètres de l'hôte (tableau ou hash indexé)

Validations:

  • Must be an Array of nested elements

host[host_parameters_attributes][name]
requis

Nom du paramêtre

Validations:

  • Must be a String

host[host_parameters_attributes][value]
requis

Valeur du paramètre

Validations:

  • Must be a String

host[build]
optionel

Validations:

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

host[enabled]
optionel

Inclure cet hôte dans les rapports Foreman

Validations:

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

host[provision_method]
optionel

Validations:

  • Must be a String

host[managed]
optionel

Drapeau True/False pour déterminer si un hôte est géré ou non géré. Note : Cette valeur détermine aussi si certains paramètres sont obligatoires.

Validations:

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

host[progress_report_id]
optionel

UUID pour surveiller l'état des tâches d'orchestration : GET /api/orchestration/:UUID/tasks

Validations:

  • Must be a String

host[comment]
optionel

Informations additionnelles sur cet hôte

Validations:

  • Must be a String

host[capabilities]
optionel

Validations:

  • Must be a String

host[compute_profile_id]
optionel

Validations:

  • Must be a number.

host[compute_attributes]
optionel

Validations:

  • Must be a Hash


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

Paramètres

Nom du paramètre Description
id
requis

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
requis

Validations:

  • Must be a Hash

host[name]
optionel

Validations:

  • Must be a String

host[environment_id]
optionel

Validations:

  • Must be a String

host[ip]
optionel

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

Validations:

  • Must be a String

host[ip6]
optionel

IPv6 address

Validations:

  • Must be a String

host[mac]
optionel

not required if its a virtual machine

Validations:

  • Must be a String

host[architecture_id]
optionel

Validations:

  • Must be a number.

host[domain_id]
optionel

Validations:

  • Must be a number.

host[puppet_proxy_id]
optionel

Validations:

  • Must be a number.

host[operatingsystem_id]
optionel

Validations:

  • Must be a String

host[puppetclass_ids]
optionel

Validations:

  • Must be an array of any type

host[medium_id]
optionel

Validations:

  • Must be a number.

host[ptable_id]
optionel

Validations:

  • Must be a number.

host[subnet_id]
optionel

IPv4 subnet

Validations:

  • Must be a number.

host[subnet6_id]
optionel

IPv6 subnet

Validations:

  • Must be a number.

host[compute_resource_id]
optionel

Validations:

  • Must be a number.

host[sp_subnet_id]
optionel

Validations:

  • Must be a number.

host[model_id]
optionel

Validations:

  • Must be a number.

host[hostgroup_id]
optionel

Validations:

  • Must be a number.

host[owner_id]
optionel

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
optionel

Validations:

  • Must be a number.

host[image_id]
optionel

Validations:

  • Must be a number.

host[host_parameters_attributes]
optionel

Validations:

  • Must be an array of any type

host[build]
optionel

Validations:

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

host[enabled]
optionel

Validations:

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

host[provision_method]
optionel

Validations:

  • Must be a String

host[managed]
optionel

Validations:

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

host[progress_report_id]
optionel

UUID pour surveiller l'état des tâches d'orchestration : GET /api/orchestration/:UUID/tasks

Validations:

  • Must be a String

host[capabilities]
optionel

Validations:

  • Must be a String

host[compute_attributes]
optionel

Validations:

  • Must be a Hash


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

Paramètres

Nom du paramètre Description
id
requis

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
Voir le statut de l'hôte

Return value may either be one of the following:

  • missing

  • failed

  • pending

  • changed

  • unchanged

  • unreported

Paramètres

Nom du paramètre Description
id
requis

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.