GET /api/templates/:template_id/template_inputs
列出模板输入

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

template_id
必填

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
选填

过滤结果

Validations:

  • Must be a String

order
选填

排序项和顺序,例如 ‘id DESC’

Validations:

  • Must be a String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.

搜索字段

字段名 类型 可能的值
input_type
name

GET /api/templates/:template_id/template_inputs/:id
显示模板输入详情

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

template_id
必填

Validations:

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

id
必填

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/templates/:template_id/template_inputs
创建模板输入

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

template_id
必填

Validations:

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

template_input
必填

Validations:

  • Must be a Hash

template_input[name]
必填

输入名称

Validations:

  • Must be a String

template_input[description]
选填 , 允许空值

输入描述

Validations:

  • Must be a String

template_input[required]
选填 , 允许空值

需要输入

Validations:

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

template_input[advanced]
选填 , 允许空值

输入时高级的

Validations:

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

template_input[input_type]
必填

输入类型

Validations:

  • Must be one of: user, fact, variable, puppet_parameter.

template_input[fact_name]
选填 , 允许空值

Fact 名称,输入类型为 fact 时使用。

Validations:

  • Must be a String

template_input[variable_name]
选填 , 允许空值

变量名称,输入类型为 variable 时使用。

Validations:

  • Must be a String

template_input[puppet_class_name]
选填 , 允许空值

Puppet 类别名称,输入类型为 puppet_parameter 时使用。

Validations:

  • Must be a String

template_input[puppet_parameter_name]
选填 , 允许空值

Puppet 参数名称,输入类型为 puppet_parameter 时使用。

Validations:

  • Must be a String

template_input[options]
选填 , 允许空值

用户输入的可选值

Validations:

  • Must be an array of any type

template_input[default]
选填 , 允许空值

Default value for user input

Validations:

  • Must be a String

template_input[hidden_value]
选填 , 允许空值

The value contains sensitive information and shouldn not be normally visible, useful e.g. for passwords

Validations:

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

template_input[value_type]
选填 , 允许空值

Value type, defaults to plain

Validations:

  • Must be one of: plain, search, date.

template_input[resource_type]
选填 , 允许空值

For values of type search, this is the resource the value searches in

Validations:

  • Must be one of: .


DELETE /api/templates/:template_id/template_inputs/:id
删除模板输入

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

template_id
必填

Validations:

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

id
必填

Validations:

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


PUT /api/templates/:template_id/template_inputs/:id
更新模板输入

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

template_id
必填

Validations:

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

id
必填

Validations:

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

template_input
必填

Validations:

  • Must be a Hash

template_input[name]
选填

输入名称

Validations:

  • Must be a String

template_input[description]
选填 , 允许空值

输入描述

Validations:

  • Must be a String

template_input[required]
选填 , 允许空值

需要输入

Validations:

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

template_input[advanced]
选填 , 允许空值

输入时高级的

Validations:

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

template_input[input_type]
选填

输入类型

Validations:

  • Must be one of: user, fact, variable, puppet_parameter.

template_input[fact_name]
选填 , 允许空值

Fact 名称,输入类型为 fact 时使用。

Validations:

  • Must be a String

template_input[variable_name]
选填 , 允许空值

变量名称,输入类型为 variable 时使用。

Validations:

  • Must be a String

template_input[puppet_class_name]
选填 , 允许空值

Puppet 类别名称,输入类型为 puppet_parameter 时使用。

Validations:

  • Must be a String

template_input[puppet_parameter_name]
选填 , 允许空值

Puppet 参数名称,输入类型为 puppet_parameter 时使用。

Validations:

  • Must be a String

template_input[options]
选填 , 允许空值

用户输入的可选值

Validations:

  • Must be an array of any type

template_input[default]
选填 , 允许空值

Default value for user input

Validations:

  • Must be a String

template_input[hidden_value]
选填 , 允许空值

The value contains sensitive information and shouldn not be normally visible, useful e.g. for passwords

Validations:

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

template_input[value_type]
选填 , 允许空值

Value type, defaults to plain

Validations:

  • Must be one of: plain, search, date.

template_input[resource_type]
选填 , 允许空值

For values of type search, this is the resource the value searches in

Validations:

  • Must be one of: .