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

Value:

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

Value:

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

Value:

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


Value:

Must be String

order
opcional

ordenar resultados


Value:

Must be String

page
opcional

paginar resultados


Value:

Must be String

per_page
opcional

número de entradas por petición


Value:

Must be String


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

Parámetros

Nombre del parámetro Descripción
id
requerido

Value:

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

Value:

Must be a Hash

smart_variable[variable]
requerido

Nombre de variable


Value:

Must be String

smart_variable[puppetclass_id]
opcional , nil permitido

ID de clase Puppet


Value:

Must be a number.

smart_variable[default_value]
opcional , nil permitido

Valor por defecto de la variable


Value:

Must be String

smart_variable[hidden_value]
opcional , nil permitido

When enabled the parameter is hidden in the UI


Value:

Must be 'true' or 'false'

smart_variable[override_value_order]
opcional , nil permitido

El orden en el cual se resuelven los valores


Value:

Must be String

smart_variable[description]
opcional , nil permitido

Descripción de la variable


Value:

Must be String

smart_variable[validator_type]
opcional , nil permitido

Tipos de valores de validación


Value:

Must be one of: regexp, list.

smart_variable[validator_rule]
opcional , nil permitido

Se utiliza para forzar ciertos valores para los parámetros


Value:

Must be String

smart_variable[variable_type]
opcional , nil permitido

Tipos de valores de variables


Value:

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)


Value:

Must be 'true' or 'false'

smart_variable[merge_default]
opcional , nil permitido

Include default value when merging all matching values


Value:

Must be 'true' or 'false'

smart_variable[avoid_duplicates]
opcional , nil permitido

Eliminar valores duplicados (sólo de tipo array)


Value:

Must be 'true' or 'false'


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

Parámetros

Nombre del parámetro Descripción
id
requerido

Value:

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

Value:

Must be a Hash

smart_variable[variable]
opcional

Nombre de variable


Value:

Must be String

smart_variable[puppetclass_id]
opcional , nil permitido

ID de clase Puppet


Value:

Must be a number.

smart_variable[default_value]
opcional , nil permitido

Valor por defecto de la variable


Value:

Must be String

smart_variable[hidden_value]
opcional , nil permitido

When enabled the parameter is hidden in the UI


Value:

Must be 'true' or 'false'

smart_variable[override_value_order]
opcional , nil permitido

El orden en el cual se resuelven los valores


Value:

Must be String

smart_variable[description]
opcional , nil permitido

Descripción de la variable


Value:

Must be String

smart_variable[validator_type]
opcional , nil permitido

Tipos de valores de validación


Value:

Must be one of: regexp, list.

smart_variable[validator_rule]
opcional , nil permitido

Se utiliza para forzar ciertos valores para los parámetros


Value:

Must be String

smart_variable[variable_type]
opcional , nil permitido

Tipos de valores de variables


Value:

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)


Value:

Must be 'true' or 'false'

smart_variable[merge_default]
opcional , nil permitido

Include default value when merging all matching values


Value:

Must be 'true' or 'false'

smart_variable[avoid_duplicates]
opcional , nil permitido

Eliminar valores duplicados (sólo de tipo array)


Value:

Must be 'true' or 'false'


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

Parámetros

Nombre del parámetro Descripción
id
requerido

Value:

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