GET /api/smart_class_parameters
List all smart class parameters

GET /api/hosts/:host_id/smart_class_parameters
List of smart class parameters for a specific host

GET /api/hostgroups/:hostgroup_id/smart_class_parameters
List of smart class parameters for a specific host group

GET /api/puppetclasses/:puppetclass_id/smart_class_parameters
List of smart class parameters for a specific Puppet class

GET /api/environments/:environment_id/smart_class_parameters
List of smart class parameters for a specific environment

GET /api/environments/:environment_id/puppetclasses/:puppetclass_id/smart_class_parameters
List of smart class parameters for a specific environment/Puppet class combination

参数

参数名字 描述
host_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.

hostgroup_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.

puppetclass_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.

environment_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 String

order
选填

结果排序

Validations:

  • Must be String

page
选填

页数

Validations:

  • Must be String

per_page
选填

每个请求中的条目数

Validations:

  • Must be String


GET /api/smart_class_parameters/:id
Show a smart class parameter

参数

参数名字 描述
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/smart_class_parameters/:id
Update a smart class parameter

参数

参数名字 描述
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.

smart_class_parameter
必填

Validations:

  • Must be a Hash

smart_class_parameter[override]
选填

Whether the smart class parameter value is managed by Foreman

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_class_parameter[description]
选填

Description of smart class

Validations:

  • Must be String

smart_class_parameter[default_value]
选填

无映射时使用的值

Validations:

  • Must be String

smart_class_parameter[hidden_value]
选填

When enabled the parameter is hidden in the UI

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_class_parameter[use_puppet_default]
选填

Do not send this parameter via the ENC. Puppet will use the value defined in the Puppet manifest for this parameter

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_class_parameter[path]
选填

解析数值的指令

Validations:

  • Must be String

smart_class_parameter[validator_type]
选填

Types of validation values

Validations:

  • Must be one of: regexp, list.

smart_class_parameter[validator_rule]
选填

Used to enforce certain values for the parameter values

Validations:

  • Must be String

smart_class_parameter[override_value_order]
选填

解析数值的指令

Validations:

  • Must be String

smart_class_parameter[parameter_type]
选填

Types of variable values

Validations:

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

smart_class_parameter[required]
选填

If true, will raise an error if there is no default value and no matcher provide a value

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_class_parameter[merge_overrides]
选填

Merge all matching values (only array/hash type)

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_class_parameter[merge_default]
选填

Include default value when merging all matching values

Validations:

  • Must be 'true' or 'false' or '1' or '0'

smart_class_parameter[avoid_duplicates]
选填

Remove duplicate values (only array type)

Validations:

  • Must be 'true' or 'false' or '1' or '0'