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

Params

Param name Description
host_id
optional

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

hostgroup_id
optional

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

puppetclass_id
optional

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

environment_id
optional

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

show_hidden
optional

Display hidden values

Validations:

  • boolean

search
optional

filter results

Validations:

  • String

order
optional

sort results

Validations:

  • String

page
optional

paginate results

Validations:

  • String

per_page
optional

number of entries per request

Validations:

  • String


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

Params

Param name Description
id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

show_hidden
optional

Display hidden values

Validations:

  • boolean


PUT /api/smart_class_parameters/:id
Update a smart class parameter

Params

Param name Description
id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

smart_class_parameter
required

Validations:

  • Hash

smart_class_parameter[override]
optional

Whether the smart class parameter value is managed by Foreman

Validations:

  • boolean

smart_class_parameter[description]
optional

Description of smart class

Validations:

  • String

smart_class_parameter[default_value]
optional

Value to use when there is no match

Validations:

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

smart_class_parameter[hidden_value]
optional

When enabled the parameter is hidden in the UI

Validations:

  • boolean

smart_class_parameter[use_puppet_default]
optional

Deprecated, please use omit

Validations:

  • boolean

smart_class_parameter[omit]
optional

Foreman will not send this parameter in classification output. Puppet will use the value defined in the Puppet manifest for this parameter

Validations:

  • boolean

smart_class_parameter[path]
optional

The order in which values are resolved

Validations:

  • String

smart_class_parameter[validator_type]
optional

Types of validation values

Validations:

  • Must be one of: regexp, list.

smart_class_parameter[validator_rule]
optional

Used to enforce certain values for the parameter values

Validations:

  • String

smart_class_parameter[override_value_order]
optional

The order in which values are resolved

Validations:

  • String

smart_class_parameter[parameter_type]
optional

Types of variable values

Validations:

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

smart_class_parameter[required]
optional

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

Validations:

  • boolean

smart_class_parameter[merge_overrides]
optional

Merge all matching values (only array/hash type)

Validations:

  • boolean

smart_class_parameter[merge_default]
optional

Include default value when merging all matching values

Validations:

  • boolean

smart_class_parameter[avoid_duplicates]
optional

Remove duplicate values (only array type)

Validations:

  • boolean