GET /api/smart_variables
Som alle smart variabelen op

GET /api/hosts/:host_id/smart_variables
Som alle smart variabelen op voor een specifieke host

GET /api/hostgroups/:hostgroup_id/smart_variables
Som alle smart variabelen op voor een specifieke host groep

GET /api/puppetclasses/:puppetclass_id/smart_variables
Som alle smart variabelen op voor een specifieke Puppet class

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

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.

show_hidden
optional

Bekijk verstopte waarden

Validations:

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

search
optional

filter resultaten

Validations:

  • Must be a String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return

Validations:

  • Must be a number.

Search fields

Field name Type Possible values
avoid_duplicates true, false
key string
merge_default true, false
merge_overrides true, false
override true, false
parameter string
puppetclass string

GET /api/smart_variables/:id
Toon een smart variabele

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

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

Bekijk verstopte waarden

Validations:

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


POST /api/smart_variables
Maak een smart variabele

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

smart_variable
required

Validations:

  • Must be a Hash

smart_variable[variable]
required

Naam van een variabele

Validations:

  • Must be a String

smart_variable[puppetclass_id]
optional , nil allowed

Puppet class ID

Validations:

  • Must be a number.

smart_variable[default_value]
optional , nil allowed

Standaard waarde van een variabele

Validations:

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

smart_variable[hidden_value]
optional , nil allowed

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 , nil allowed

De volgorde waarin waarden worden opgezocht

Validations:

  • Must be a String

smart_variable[description]
optional , nil allowed

Beschrijving van een variabele

Validations:

  • Must be a String

smart_variable[validator_type]
optional , nil allowed

Types van validatie waarden

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
optional , nil allowed

Gebruikt om sommige waarden af te dwingen voor de parameterwaarden

Validations:

  • Must be a String

smart_variable[variable_type]
optional , nil allowed

Types van variabelen

Validations:

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

smart_variable[merge_overrides]
optional , nil allowed

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

Validations:

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

smart_variable[merge_default]
optional , nil allowed

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 , nil allowed

Verwijder dubbele waarden (alleen array type)

Validations:

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


PUT /api/smart_variables/:id
Wijzig een smart variabele

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

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 , nil allowed

Puppet class ID

Validations:

  • Must be a number.

smart_variable[default_value]
optional , nil allowed

Standaard waarde van een variabele

Validations:

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

smart_variable[hidden_value]
optional , nil allowed

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 , nil allowed

De volgorde waarin waarden worden opgezocht

Validations:

  • Must be a String

smart_variable[description]
optional , nil allowed

Beschrijving van een variabele

Validations:

  • Must be a String

smart_variable[validator_type]
optional , nil allowed

Types van validatie waarden

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
optional , nil allowed

Gebruikt om sommige waarden af te dwingen voor de parameterwaarden

Validations:

  • Must be a String

smart_variable[variable_type]
optional , nil allowed

Types van variabelen

Validations:

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

smart_variable[merge_overrides]
optional , nil allowed

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

Validations:

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

smart_variable[merge_default]
optional , nil allowed

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 , nil allowed

Verwijder dubbele waarden (alleen array type)

Validations:

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


DELETE /api/smart_variables/:id
Verwijder een smart variabele

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

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.