GET /api/smart_variables
Llista totes les variables intel·ligents

GET /api/hosts/:host_id/smart_variables
List of smart variables for a specific host

GET /api/hostgroups/:hostgroup_id/smart_variables
List of smart variables for a specific host group

GET /api/puppetclasses/:puppetclass_id/smart_variables
List of smart variables for a specific Puppet class

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.

show_hidden
optional

Display hidden values

Validations:

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

search
optional

filtra els resultats

Validations:

  • Must be a String

order
optional

ordena els resultats

Validations:

  • Must be a String

page
optional

pagina els resultats

Validations:

  • Must be a String

per_page
optional

Nombre d'entrades per petició

Validations:

  • Must be a String


GET /api/smart_variables/:id
Mostra una variable intel·ligent

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.

show_hidden
optional

Display hidden values

Validations:

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


POST /api/smart_variables
Crea una variable intel·ligent

Params

Param name Description
smart_variable
required

Validations:

  • Must be a Hash

smart_variable[variable]
required

Nom de la variable

Validations:

  • Must be a String

smart_variable[puppetclass_id]
optional , nil allowed

ID de la classe de Puppet

Validations:

  • Must be a number.

smart_variable[default_value]
optional , nil allowed

Valor per defecte de la variable

Validations:

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

smart_variable[hidden_value]
optional , nil allowed

When enabled the parameter is hidden in the UI

Validations:

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

smart_variable[override_value_order]
optional , nil allowed

The order in which values are resolved

Validations:

  • Must be a String

smart_variable[description]
optional , nil allowed

Descripció de la variable

Validations:

  • Must be a String

smart_variable[validator_type]
optional , nil allowed

Tipus de valors de validació

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
optional , nil allowed

Used to enforce certain values for the parameter values

Validations:

  • Must be a String

smart_variable[variable_type]
optional , nil allowed

Tipus de valors de la variable

Validations:

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

smart_variable[merge_overrides]
optional , nil allowed

Merge all matching values (only array/hash type)

Validations:

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

smart_variable[merge_default]
optional , nil allowed

Include default value when merging all matching values

Validations:

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

smart_variable[avoid_duplicates]
optional , nil allowed

Remove duplicate values (only array type)

Validations:

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


PUT /api/smart_variables/:id
Actualitza una variable intel·ligent

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 a String

smart_variable[puppetclass_id]
optional , nil allowed

ID de la classe de Puppet

Validations:

  • Must be a number.

smart_variable[default_value]
optional , nil allowed

Valor per defecte de la variable

Validations:

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

smart_variable[hidden_value]
optional , nil allowed

When enabled the parameter is hidden in the UI

Validations:

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

smart_variable[override_value_order]
optional , nil allowed

The order in which values are resolved

Validations:

  • Must be a String

smart_variable[description]
optional , nil allowed

Descripció de la variable

Validations:

  • Must be a String

smart_variable[validator_type]
optional , nil allowed

Tipus de valors de validació

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
optional , nil allowed

Used to enforce certain values for the parameter values

Validations:

  • Must be a String

smart_variable[variable_type]
optional , nil allowed

Tipus de valors de la variable

Validations:

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

smart_variable[merge_overrides]
optional , nil allowed

Merge all matching values (only array/hash type)

Validations:

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

smart_variable[merge_default]
optional , nil allowed

Include default value when merging all matching values

Validations:

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

smart_variable[avoid_duplicates]
optional , nil allowed

Remove duplicate values (only array type)

Validations:

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


DELETE /api/smart_variables/:id
Suprimeix una variable intel·ligent

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.