GET /api/smart_variables
Listar todas as variáveis inteligentes

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

Parâmentros

Nome parâmetro Descrição
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 requisições


Value:

Must be String


GET /api/smart_variables/:id
Mostrar uma variável inteligente

Parâmentros

Nome parâmetro Descrição
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
Criar uma variável inteligente

Parâmentros

Nome parâmetro Descrição
smart_variable
requerido

Value:

Must be a Hash

smart_variable[variable]
requerido

Nome da variável


Value:

Must be String

smart_variable[puppetclass_id]
opcional , nulo permitido

Mostrar ID da classe


Value:

Must be a number.

smart_variable[default_value]
opcional , nulo permitido

Valor padrão da variável


Value:

Must be String

smart_variable[hidden_value]
opcional , nulo permitido

When enabled the parameter is hidden in the UI


Value:

Must be 'true' or 'false'

smart_variable[override_value_order]
opcional , nulo permitido

A ordem na qual os valores são resolvidos


Value:

Must be String

smart_variable[description]
opcional , nulo permitido

Descrição da variável


Value:

Must be String

smart_variable[validator_type]
opcional , nulo permitido

Tipos de valores de validação


Value:

Must be one of: regexp, list.

smart_variable[validator_rule]
opcional , nulo permitido

Used to enforce certain values for the parameter values


Value:

Must be String

smart_variable[variable_type]
opcional , nulo permitido

Tipos de valores de validação


Value:

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

smart_variable[merge_overrides]
opcional , nulo permitido

Merge all matching values (only array/hash type)


Value:

Must be 'true' or 'false'

smart_variable[merge_default]
opcional , nulo permitido

Include default value when merging all matching values


Value:

Must be 'true' or 'false'

smart_variable[avoid_duplicates]
opcional , nulo permitido

Remove duplicate values (only array type)


Value:

Must be 'true' or 'false'


PUT /api/smart_variables/:id
Atualizar uma variável inteligente

Parâmentros

Nome parâmetro Descrição
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

Nome da variável


Value:

Must be String

smart_variable[puppetclass_id]
opcional , nulo permitido

Mostrar ID da classe


Value:

Must be a number.

smart_variable[default_value]
opcional , nulo permitido

Valor padrão da variável


Value:

Must be String

smart_variable[hidden_value]
opcional , nulo permitido

When enabled the parameter is hidden in the UI


Value:

Must be 'true' or 'false'

smart_variable[override_value_order]
opcional , nulo permitido

A ordem na qual os valores são resolvidos


Value:

Must be String

smart_variable[description]
opcional , nulo permitido

Descrição da variável


Value:

Must be String

smart_variable[validator_type]
opcional , nulo permitido

Tipos de valores de validação


Value:

Must be one of: regexp, list.

smart_variable[validator_rule]
opcional , nulo permitido

Used to enforce certain values for the parameter values


Value:

Must be String

smart_variable[variable_type]
opcional , nulo permitido

Tipos de valores de validação


Value:

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

smart_variable[merge_overrides]
opcional , nulo permitido

Merge all matching values (only array/hash type)


Value:

Must be 'true' or 'false'

smart_variable[merge_default]
opcional , nulo permitido

Include default value when merging all matching values


Value:

Must be 'true' or 'false'

smart_variable[avoid_duplicates]
opcional , nulo permitido

Remove duplicate values (only array type)


Value:

Must be 'true' or 'false'


DELETE /api/smart_variables/:id
Apagar uma variável inteligente

Parâmentros

Nome parâmetro Descrição
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.