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

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

host_id
optionel

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
optionel

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
optionel

Validations:

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

show_hidden
optionel

Afficher les valeurs masquées

Validations:

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

search
optionel

filtrer les résultats

Validations:

  • Must be a String

order
optionel

Champ et sens de tri, ex: 'id DESC'

Validations:

  • Must be a String

page
optionel

Numéro de la page, commençant par 1

Validations:

  • Must be a number.

per_page
optionel

Nombre de résultats par page à renvoyer

Validations:

  • Must be a number.

Rechercher les champs

Nom du champ Type Valeurs possibles
avoid_duplicates true, false
key string
merge_default true, false
merge_overrides true, false
override true, false
parameter string
puppetclass string

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

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

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.

show_hidden
optionel

Afficher les valeurs masquées

Validations:

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


POST /api/smart_variables
Créer une smart variable

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

smart_variable
requis

Validations:

  • Must be a Hash

smart_variable[variable]
requis

Nom de la variable

Validations:

  • Must be a String

smart_variable[puppetclass_id]
optionel , nil autorisé

ID de la classe Puppet

Validations:

  • Must be a number.

smart_variable[default_value]
optionel , nil autorisé

Valeur par défaut de la variable

Validations:

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

smart_variable[hidden_value]
optionel , nil autorisé

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

Validations:

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

smart_variable[override_value_order]
optionel , nil autorisé

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

Validations:

  • Must be a String

smart_variable[description]
optionel , nil autorisé

Description de la variable

Validations:

  • Must be a String

smart_variable[validator_type]
optionel , nil autorisé

Types des valeurs pour la validation

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
optionel , nil autorisé

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

Validations:

  • Must be a String

smart_variable[variable_type]
optionel , nil autorisé

Types de variables des valeurs

Validations:

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

smart_variable[merge_overrides]
optionel , nil autorisé

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

Validations:

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

smart_variable[merge_default]
optionel , nil autorisé

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

Validations:

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

smart_variable[avoid_duplicates]
optionel , nil autorisé

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

Validations:

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


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

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

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.

smart_variable
requis

Validations:

  • Must be a Hash

smart_variable[variable]
optionel

Nom de la variable

Validations:

  • Must be a String

smart_variable[puppetclass_id]
optionel , nil autorisé

ID de la classe Puppet

Validations:

  • Must be a number.

smart_variable[default_value]
optionel , nil autorisé

Valeur par défaut de la variable

Validations:

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

smart_variable[hidden_value]
optionel , nil autorisé

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

Validations:

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

smart_variable[override_value_order]
optionel , nil autorisé

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

Validations:

  • Must be a String

smart_variable[description]
optionel , nil autorisé

Description de la variable

Validations:

  • Must be a String

smart_variable[validator_type]
optionel , nil autorisé

Types des valeurs pour la validation

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
optionel , nil autorisé

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

Validations:

  • Must be a String

smart_variable[variable_type]
optionel , nil autorisé

Types de variables des valeurs

Validations:

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

smart_variable[merge_overrides]
optionel , nil autorisé

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

Validations:

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

smart_variable[merge_default]
optionel , nil autorisé

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

Validations:

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

smart_variable[avoid_duplicates]
optionel , nil autorisé

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

Validations:

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


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

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

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.