GET /api/puppetclasses/298486374/smart_class_parameters 200 { "total": 1, "subtotal": 1, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "description": null, "override": true, "parameter_type": "string", "hidden_value?": false, "omit": null, "required": false, "validator_type": null, "validator_rule": null, "merge_overrides": false, "merge_default": false, "avoid_duplicates": false, "override_value_order": "fqdn\norganization,location\nhostgroup", "created_at": "2021-05-18 16:25:03 UTC", "updated_at": "2021-05-18 16:25:03 UTC", "parameter": "custom_class_param", "id": 1018350795, "override_values_count": 0, "default_value": "abcdef", "puppetclass_id": 298486374, "puppetclass_name": "apache" } ] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
host_id optional |
Validations:
|
hostgroup_id optional |
Validations:
|
puppetclass_id optional |
Validations:
|
environment_id optional |
Validations:
|
show_hidden optional |
Display hidden values Validations:
|
search optional |
filter results Validations:
|
order optional |
Sort field and order, eg. ‘id DESC’ Validations:
|
page optional |
Page number, starting at 1 Validations:
|
per_page optional |
Number of results per page to return, ‘all’ to return all results Validations:
|
Field name | Type | 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/puppetclasses/980190962/smart_class_parameters/1018350796 200 { "description": null, "override": false, "parameter_type": "string", "hidden_value?": true, "omit": null, "required": false, "validator_type": null, "validator_rule": null, "merge_overrides": false, "merge_default": false, "avoid_duplicates": false, "override_value_order": "fqdn\nhostgroup\nos\ndomain", "created_at": "2021-05-18 15:44:28 UTC", "updated_at": "2021-05-18 15:44:28 UTC", "parameter": "param23", "id": 1018350796, "override_values_count": 1, "default_value": "*****", "puppetclass_id": 980190962, "puppetclass_name": "base", "environments": [], "override_values": [ { "created_at": "2021-05-18 15:44:28 UTC", "updated_at": "2021-05-18 15:44:28 UTC", "id": 1018350796, "match": "os=fake", "value": "*****", "omit": false } ] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
show_hidden optional |
Display hidden values Validations:
|
PUT /api/smart_class_parameters/1018350796 { "smart_class_parameter": { "override": true, "required": true } } 200 { "description": null, "override": true, "parameter_type": "string", "hidden_value?": false, "omit": null, "required": true, "validator_type": null, "validator_rule": null, "merge_overrides": false, "merge_default": false, "avoid_duplicates": false, "override_value_order": "fqdn\nhostgroup\nos\ndomain", "created_at": "2021-05-18 16:25:04 UTC", "updated_at": "2021-05-18 16:25:04 UTC", "parameter": "param224", "id": 1018350796, "override_values_count": 1, "default_value": "default", "puppetclass_id": 298486374, "puppetclass_name": "apache", "environments": [ { "id": 334344675, "name": "production" } ], "puppetclass": { "id": 298486374, "name": "apache", "module_name": "apache" }, "override_values": [ { "created_at": "2021-05-18 16:25:04 UTC", "updated_at": "2021-05-18 16:25:04 UTC", "id": 1018350796, "match": "domain=example.com", "value": "uDaSXdrHjd", "omit": false } ] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
smart_class_parameter required |
Validations:
|
smart_class_parameter[override] optional |
Whether the smart class parameter value is managed by Foreman Validations:
|
smart_class_parameter[description] optional |
Description of smart class Validations:
|
smart_class_parameter[default_value] optional |
Value to use when there is no match Validations:
|
smart_class_parameter[hidden_value] optional |
When enabled the parameter is hidden in the UI Validations:
|
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:
|
smart_class_parameter[path] optional |
The order in which values are resolved Validations:
|
smart_class_parameter[validator_type] optional |
Types of validation values Validations:
|
smart_class_parameter[validator_rule] optional |
Used to enforce certain values for the parameter values Validations:
|
smart_class_parameter[override_value_order] optional |
The order in which values are resolved Validations:
|
smart_class_parameter[parameter_type] optional |
Types of variable values Validations:
|
smart_class_parameter[required] optional |
If true, will raise an error if there is no default value and no matcher provide a value Validations:
|
smart_class_parameter[merge_overrides] optional |
Merge all matching values (only array/hash type) Validations:
|
smart_class_parameter[merge_default] optional |
Include default value when merging all matching values Validations:
|
smart_class_parameter[avoid_duplicates] optional |
Remove duplicate values (only array type) Validations:
|