GET /api/smart_variables/:smart_variable_id/override_values
List of override values for a specific smart variable

GET /api/smart_class_parameters/:smart_class_parameter_id/override_values
List of override values for a specific smart class parameter

Examples

GET /api/smart_variables/298486374-ssl_port/override_values
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "created_at": "2018-07-24 12:47:09 UTC",
      "updated_at": "2018-07-24 12:47:09 UTC",
      "id": 281110143,
      "match": "hostgroup=Common",
      "value": "8443",
      "omit": false,
      "use_puppet_default": false
    }
  ]
}

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

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

smart_class_parameter_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

page
optional

paginate results

Validations:

  • Must be a String

per_page
optional

number of entries per request

Validations:

  • Must be a String


GET /api/smart_variables/:smart_variable_id/override_values/:id
Show an override value for a specific smart variable

GET /api/smart_class_parameters/:smart_class_parameter_id/override_values/:id
Show an override value for a specific smart class parameter

Examples

GET /api/smart_variables/298486374-ssl_port/override_values/281110143
200
{
  "created_at": "2018-07-24 12:47:09 UTC",
  "updated_at": "2018-07-24 12:47:09 UTC",
  "id": 281110143,
  "match": "hostgroup=Common",
  "value": "8443",
  "omit": false,
  "use_puppet_default": false
}

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

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

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

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


POST /api/smart_variables/:smart_variable_id/override_values
Create an override value for a specific smart variable

POST /api/smart_class_parameters/:smart_class_parameter_id/override_values
Create an override value for a specific smart class parameter

Examples

POST /api/smart_class_parameters/1018350796/override_values
{
  "override_value": {
    "value": "xyz=10"
  }
}
500
{
  "error": {
    "message": "Validation failed: Match can't be blank, Match is invalid"
  }
}

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

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

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

override_value
required

Validations:

  • Must be a Hash

override_value[match]
required

Override match

Validations:

  • Must be a String

override_value[value]
optional , nil allowed

Override value, required if omit is false

Validations:

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

override_value[use_puppet_default]
optional , nil allowed

Deprecated, please use omit

Validations:

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

override_value[omit]
optional , nil allowed

Foreman will not send this parameter in classification output, replaces use_puppet_default

Validations:

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


PUT /api/smart_variables/:smart_variable_id/override_values/:id
Update an override value for a specific smart variable

PUT /api/smart_class_parameters/:smart_class_parameter_id/override_values/:id
Update an override value for a specific smart class parameter

Examples

PUT /api/smart_class_parameters/328495940-cluster/override_values/874520030
{
  "override_value": {
    "match": "os=abc"
  }
}
200
{
  "created_at": "2018-07-24 12:47:09 UTC",
  "updated_at": "2018-07-24 12:47:23 UTC",
  "id": 874520030,
  "match": "os=abc",
  "value": "8080",
  "omit": false,
  "use_puppet_default": false
}

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

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

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

override_value
required

Validations:

  • Must be a Hash

override_value[match]
optional

Override match

Validations:

  • Must be a String

override_value[value]
optional , nil allowed

Override value, required if omit is false

Validations:

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

override_value[use_puppet_default]
optional , nil allowed

Deprecated, please use omit

Validations:

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

override_value[omit]
optional , nil allowed

Foreman will not send this parameter in classification output, replaces use_puppet_default

Validations:

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


DELETE /api/smart_variables/:smart_variable_id/override_values/:id
Delete an override value for a specific smart variable

DELETE /api/smart_class_parameters/:smart_class_parameter_id/override_values/:id
Delete an override value for a specific smart class parameter

Examples

DELETE /api/smart_variables/1018350802/override_values/1018350803
{
  "override_value": {}
}
200
{
  "created_at": "2018-07-24 12:47:23 UTC",
  "updated_at": "2018-07-24 12:47:23 UTC",
  "id": 1018350803,
  "match": "is_virtual=true",
  "value": "some_value",
  "omit": false,
  "use_puppet_default": false
}

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

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

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

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.