GET /api/config_templates
List templates

参数

参数名字 描述
search
选填

过滤结果


Value:

Must be String

order
选填

结果排序


Value:

Must be String

page
选填

页数


Value:

Must be String

per_page
选填

每个请求中的条目数


Value:

Must be String


GET /api/config_templates/:id
Show template details

参数

参数名字 描述
id
必填

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/config_templates
Create a template

参数

参数名字 描述
config_template
必填

Value:

Must be a Hash

config_template[name]
必填

template name


Value:

Must be String

config_template[template]
必填

Value:

Must be String

config_template[snippet]
选填 , 允许空值

Value:

Must be 'true' or 'false'

config_template[audit_comment]
选填 , 允许空值

Value:

Must be String

config_template[template_kind_id]
选填 , 允许空值

not relevant for snippet


Value:

Must be a number.

config_template[template_combinations_attributes]
选填

Array of template combinations (hostgroup_id, environment_id)


Value:

Must be an array of any type

config_template[operatingsystem_ids]
选填

Array of operating systems ID to associate the template with


Value:

Must be an array of any type


PUT /api/config_templates/:id
Update a template

参数

参数名字 描述
id
必填

Value:

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

Value:

Must be a Hash

config_template[name]
选填

template name


Value:

Must be String

config_template[template]
选填

Value:

Must be String

config_template[snippet]
选填

Value:

Must be 'true' or 'false'

config_template[audit_comment]
选填 , 允许空值

Value:

Must be String

config_template[template_kind_id]
选填 , 允许空值

not relevant for snippet


Value:

Must be a number.

config_template[template_combinations_attributes]
选填

Array of template combinations (hostgroup_id, environment_id)


Value:

Must be an array of any type

config_template[operatingsystem_ids]
选填

Array of operating systems ID to associate the template with


Value:

Must be an array of any type


GET /api/config_templates/revision

参数

参数名字 描述
version
选填

template version


Value:

Must be String


DELETE /api/config_templates/:id
Delete a template

参数

参数名字 描述
id
必填

Value:

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