GET /api/config_templates
List templates

參數

參數名字 描述
search
選填

篩選結果

Validations:

  • Must be String

order
選填

排序結果

Validations:

  • Must be String

page
選填

編頁結果

Validations:

  • Must be String

per_page
選填

每個請求的項目數量

Validations:

  • Must be String


GET /api/config_templates/:id
Show template details

參數

參數名字 描述
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/config_templates
Create a template

參數

參數名字 描述
config_template
必填

Validations:

  • Must be a Hash

config_template[name]
必填

範本名稱

Validations:

  • Must be String

config_template[template]
必填

Validations:

  • Must be String

config_template[snippet]
選填 , 允許空值

Validations:

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

config_template[audit_comment]
選填 , 允許空值

Validations:

  • Must be String

config_template[template_kind_id]
選填 , 允許空值

與程式碼片段不相關

Validations:

  • Must be a number.

config_template[template_combinations_attributes]
選填

範本組合陣列(hostgroup_id、environment_id)

Validations:

  • Must be an array of any type

config_template[operatingsystem_ids]
選填

Array of operating systems ID to associate the template with

Validations:

  • Must be an array of any type


PUT /api/config_templates/:id
Update a 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.

config_template
必填

Validations:

  • Must be a Hash

config_template[name]
選填

範本名稱

Validations:

  • Must be String

config_template[template]
選填

Validations:

  • Must be String

config_template[snippet]
選填

Validations:

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

config_template[audit_comment]
選填 , 允許空值

Validations:

  • Must be String

config_template[template_kind_id]
選填 , 允許空值

與程式碼片段不相關

Validations:

  • Must be a number.

config_template[template_combinations_attributes]
選填

範本組合陣列(hostgroup_id、environment_id)

Validations:

  • Must be an array of any type

config_template[operatingsystem_ids]
選填

Array of operating systems ID to associate the template with

Validations:

  • Must be an array of any type


GET /api/config_templates/revision

參數

參數名字 描述
version
選填

範本版本

Validations:

  • Must be String


DELETE /api/config_templates/:id
Delete a 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.


GET /api/config_templates/build_pxe_default
Change the default PXE menu on all configured TFTP servers