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
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

host_id
Optional

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
Optional

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
Optional

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
Optional

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

show_hidden
Optional

Display hidden values

Validations:

  • Must be one of: true, false, 1, 0.

search
Optional

filter results

Validations:

  • Must be a String

order
Optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
Optional

paginate results

Validations:

  • Must be a String

per_page
Optional

number of entries per request

Validations:

  • Must be a String

Search fields

Field name Tipo Possible values
avoid_duplicates true, false
environment string
key string
merge_default true, false
merge_overrides true, false
override true, false
parameter string
puppetclass string
puppetclass_name string

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

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

show_hidden
Optional

Display hidden values

Validations:

  • Must be one of: true, false, 1, 0.


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

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

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
Required

Validations:

  • Must be a Hash

smart_class_parameter[override]
Optional

Whether the smart class parameter value is managed by Foreman

Validations:

  • Must be one of: true, false, 1, 0.

smart_class_parameter[description]
Optional

Description of smart class

Validations:

  • Must be a String

smart_class_parameter[default_value]
Optional

Value to use when there is no match

Validations:

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

smart_class_parameter[hidden_value]
Optional

When enabled the parameter is hidden in the UI

Validations:

  • Must be one of: true, false, 1, 0.

smart_class_parameter[use_puppet_default]
Optional

Deprecated, please use omit

Validations:

  • Must be one of: true, false, 1, 0.

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:

  • Must be one of: true, false, 1, 0.

smart_class_parameter[path]
Optional

A orde na cual se resolven os valores

Validations:

  • Must be a 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:

  • Must be a String

smart_class_parameter[override_value_order]
Optional

A orde na cual se resolven os valores

Validations:

  • Must be a 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:

  • Must be one of: true, false, 1, 0.

smart_class_parameter[merge_overrides]
Optional

Merge all matching values (only array/hash type)

Validations:

  • Must be one of: true, false, 1, 0.

smart_class_parameter[merge_default]
Optional

Include default value when merging all matching values

Validations:

  • Must be one of: true, false, 1, 0.

smart_class_parameter[avoid_duplicates]
Optional

Remove duplicate values (only array type)

Validations:

  • Must be one of: true, false, 1, 0.