GET /api/smart_variables
Enumera todas las variables inteligentes

GET /api/hosts/:host_id/smart_variables
Lista de parámetros de clase inteligentes para un host determinado

GET /api/hostgroups/:hostgroup_id/smart_variables
Lista de parámetros de clase inteligentes para un grupo de hosts determinado

GET /api/puppetclasses/:puppetclass_id/smart_variables
Lista de parámetros de clase inteligentes para una clase Puppet determinada

Parámetros

Nombre del parámetro Descripción
host_id
opcional

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
opcional

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
opcional

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
opcional

filtrar resultados

Validations:

  • Must be String

order
opcional

ordenar resultados

Validations:

  • Must be String

page
opcional

paginar resultados

Validations:

  • Must be String

per_page
opcional

número de entradas por petición

Validations:

  • Must be String


GET /api/smart_variables/:id
Mostrar una variable inteligente

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.


POST /api/smart_variables
Crear una variable inteligente

Parámetros

Nombre del parámetro Descripción
smart_variable
requerido

Validations:

  • Must be a Hash

smart_variable[variable]
requerido

Nombre de variable

Validations:

  • Must be String

smart_variable[puppetclass_id]
opcional , nil permitido

ID de clase Puppet

Validations:

  • Must be a number.

smart_variable[default_value]
opcional , nil permitido

Valor por defecto de la variable

Validations:

  • Must be String

smart_variable[hidden_value]
opcional , nil permitido

When enabled the parameter is hidden in the UI

Validations:

  • Must be ‘true’ or ‘false’ or ‘1’ or ‘0’

smart_variable[override_value_order]
opcional , nil permitido

El orden en el cual se resuelven los valores

Validations:

  • Must be String

smart_variable[description]
opcional , nil permitido

Descripción de la variable

Validations:

  • Must be String

smart_variable[validator_type]
opcional , nil permitido

Tipos de valores de validación

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
opcional , nil permitido

Se utiliza para forzar ciertos valores para los parámetros

Validations:

  • Must be String

smart_variable[variable_type]
opcional , nil permitido

Tipos de valores de variables

Validations:

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

smart_variable[merge_overrides]
opcional , nil permitido

Combinar todos los valores coincidentes (sólo de tipo array/hash)

Validations:

  • Must be ‘true’ or ‘false’ or ‘1’ or ‘0’

smart_variable[merge_default]
opcional , nil permitido

Include default value when merging all matching values

Validations:

  • Must be ‘true’ or ‘false’ or ‘1’ or ‘0’

smart_variable[avoid_duplicates]
opcional , nil permitido

Eliminar valores duplicados (sólo de tipo array)

Validations:

  • Must be ‘true’ or ‘false’ or ‘1’ or ‘0’


PUT /api/smart_variables/:id
Actualizar una variable inteligente

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.

smart_variable
requerido

Validations:

  • Must be a Hash

smart_variable[variable]
opcional

Nombre de variable

Validations:

  • Must be String

smart_variable[puppetclass_id]
opcional , nil permitido

ID de clase Puppet

Validations:

  • Must be a number.

smart_variable[default_value]
opcional , nil permitido

Valor por defecto de la variable

Validations:

  • Must be String

smart_variable[hidden_value]
opcional , nil permitido

When enabled the parameter is hidden in the UI

Validations:

  • Must be ‘true’ or ‘false’ or ‘1’ or ‘0’

smart_variable[override_value_order]
opcional , nil permitido

El orden en el cual se resuelven los valores

Validations:

  • Must be String

smart_variable[description]
opcional , nil permitido

Descripción de la variable

Validations:

  • Must be String

smart_variable[validator_type]
opcional , nil permitido

Tipos de valores de validación

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
opcional , nil permitido

Se utiliza para forzar ciertos valores para los parámetros

Validations:

  • Must be String

smart_variable[variable_type]
opcional , nil permitido

Tipos de valores de variables

Validations:

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

smart_variable[merge_overrides]
opcional , nil permitido

Combinar todos los valores coincidentes (sólo de tipo array/hash)

Validations:

  • Must be ‘true’ or ‘false’ or ‘1’ or ‘0’

smart_variable[merge_default]
opcional , nil permitido

Include default value when merging all matching values

Validations:

  • Must be ‘true’ or ‘false’ or ‘1’ or ‘0’

smart_variable[avoid_duplicates]
opcional , nil permitido

Eliminar valores duplicados (sólo de tipo array)

Validations:

  • Must be ‘true’ or ‘false’ or ‘1’ or ‘0’


DELETE /api/smart_variables/:id
Borrar una variable inteligente

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.