Examples

PUT /api/smart_variables/1018350799-IJcocqAlPP
{
  "smart_variable": {
    "hidden_value": false
  }
}
200
{
  "description": null,
  "parameter_type": null,
  "variable_type": null,
  "hidden_value?": false,
  "validator_type": null,
  "validator_rule": null,
  "override_value_order": "fqdn\nhostgroup\nos\ndomain",
  "merge_overrides": false,
  "merge_default": false,
  "avoid_duplicates": false,
  "puppetclass_id": 980190962,
  "puppetclass_name": "base",
  "created_at": "2019-09-11 14:34:11 UTC",
  "updated_at": "2019-09-11 14:34:11 UTC",
  "variable": "IJcocqAlPP",
  "id": 1018350799,
  "default_value": null,
  "override_values_count": 0,
  "override_values": []
}

Params

Param Name Description
location_id
Optional

Scope met locaties

Validations:

  • Must be a Integer

organization_id
Optional

Scope met organisaties

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_variable
Required

Validations:

  • Must be a Hash

smart_variable[variable]
Optional

Naam van een variabele

Validations:

  • Must be a String

smart_variable[puppetclass_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Puppet class ID

Validations:

  • Must be a number.

smart_variable[default_value]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Standaard waarde van een variabele

Validations:

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

smart_variable[hidden_value]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Als aangezet dan wordt de parameter wordt hidden in de UI

Validations:

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

smart_variable[override_value_order]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

De volgorde waarin waarden worden opgezocht

Validations:

  • Must be a String

smart_variable[description]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Beschrijving van een variabele

Validations:

  • Must be a String

smart_variable[validator_type]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Types van validatie waarden

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Gebruikt om sommige waarden af te dwingen voor de parameterwaarden

Validations:

  • Must be a String

smart_variable[variable_type]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Types van variabelen

Validations:

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

smart_variable[merge_overrides]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Voeg alle matching values samen (alleen array/hash types)

Validations:

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

smart_variable[merge_default]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Voeg een default value toe wanneer alle matching waarden worden samengevoegd

Validations:

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

smart_variable[avoid_duplicates]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Verwijder dubbele waarden (alleen array type)

Validations:

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