GET /api/smart_variables
Afficher toutes les smart variables

GET /api/hosts/:host_id/smart_variables
Liste des smart variables pour un hôte spécifique

GET /api/hostgroups/:hostgroup_id/smart_variables
Liste des smart variables pour un groupe d'hôtes spécifique

GET /api/puppetclasses/:puppetclass_id/smart_variables
Liste des smart variables pour une classe Puppet spécifique

Params

Param Name Description
host_id
Optional

Validations:

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

hostgroup_id
Optional

Validations:

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

puppetclass_id
Optional

Validations:

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

search
Optional

filtrer les résultats

Validations:

  • Must be String

order
Optional

trier les resultats

Validations:

  • Must be String

page
Optional

paginer les résultats

Validations:

  • Must be String

per_page
Optional

nombre d'entier par requête

Validations:

  • Must be String


GET /api/smart_variables/:id
Afficher une smart variable

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.


POST /api/smart_variables
Créer une smart variable

Params

Param Name Description
smart_variable
Required

Validations:

  • Must be a Hash

smart_variable[variable]
Required

Nom de la variable

Validations:

  • Must be String

smart_variable[puppetclass_id]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

ID de la classe Puppet

Validations:

  • Must be a number.

smart_variable[default_value]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Valeur par défaut de la variable

Validations:

  • Must be String

smart_variable[hidden_value]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Quand activé, le paramètre est caché dans l'interface

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_variable[override_value_order]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

L'ordre dans lequel les valeurs sont interprétés

Validations:

  • Must be String

smart_variable[description]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Description de la variable

Validations:

  • Must be String

smart_variable[validator_type]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Types des valeurs pour la validation

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Utilisé pour forcer certaines valeurs pour les valeurs des paramètres

Validations:

  • Must be String

smart_variable[variable_type]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Types de variables des valeurs

Validations:

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

smart_variable[merge_overrides]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Fusionner toutes les valeurs qui correspondent (seulement pour les types tableau/hash)

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_variable[merge_default]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Inclus la valeur par défaut lors qu'on fusionne les valeurs de concordance

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_variable[avoid_duplicates]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Supprime les valeurs dupliquées (seulement pour le type tableau)

Validations:

  • Must be 'true' or 'false' or '1' or '0'


PUT /api/smart_variables/:id
Mise à jour d'une smart variable

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.

smart_variable
Required

Validations:

  • Must be a Hash

smart_variable[variable]
Optional

Nom de la variable

Validations:

  • Must be String

smart_variable[puppetclass_id]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

ID de la classe Puppet

Validations:

  • Must be a number.

smart_variable[default_value]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Valeur par défaut de la variable

Validations:

  • Must be String

smart_variable[hidden_value]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Quand activé, le paramètre est caché dans l'interface

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_variable[override_value_order]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

L'ordre dans lequel les valeurs sont interprétés

Validations:

  • Must be String

smart_variable[description]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Description de la variable

Validations:

  • Must be String

smart_variable[validator_type]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Types des valeurs pour la validation

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Utilisé pour forcer certaines valeurs pour les valeurs des paramètres

Validations:

  • Must be String

smart_variable[variable_type]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Types de variables des valeurs

Validations:

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

smart_variable[merge_overrides]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Fusionner toutes les valeurs qui correspondent (seulement pour les types tableau/hash)

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_variable[merge_default]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Inclus la valeur par défaut lors qu'on fusionne les valeurs de concordance

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_variable[avoid_duplicates]
Optional , <span class="translation_missing" title="translation missing: fr.apipie.nil_allowed">Nil Allowed</span>

Supprime les valeurs dupliquées (seulement pour le type tableau)

Validations:

  • Must be 'true' or 'false' or '1' or '0'


DELETE /api/smart_variables/:id
Supprimer une smart variable

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.