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

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
選填

頁數,從 1 開始

Validations:

  • Must be a number.

per_page
選填

每頁要傳回的結果數量

Validations:

  • Must be a number.

Search fields

Field name 類型 Possible values
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 時使用

Validations:

  • Must be a String

template_input[variable_name]
選填 , 允許空值

變數名稱,當輸入類型是 variable 時使用

Validations:

  • Must be a String

template_input[puppet_class_name]
選填 , 允許空值

puppet class 名稱,當輸入類型是 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 時使用

Validations:

  • Must be a String

template_input[variable_name]
選填 , 允許空值

變數名稱,當輸入類型是 variable 時使用

Validations:

  • Must be a String

template_input[puppet_class_name]
選填 , 允許空值

puppet class 名稱,當輸入類型是 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: .