Examples

POST /api/templates/1007981803-report_template37/template_inputs
{
  "template_input": {
    "name": "is_potato",
    "input_type": "user",
    "options": [
      "true",
      "false"
    ]
  }
}
201
{
  "template_id": 1007981803,
  "fact_name": null,
  "variable_name": null,
  "puppet_parameter_name": null,
  "puppet_class_name": null,
  "description": null,
  "required": false,
  "id": 3,
  "name": "is_potato",
  "input_type": "user",
  "options": [
    "true",
    "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

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

template_input
required

Validations:

  • Must be a Hash

template_input[name]
required

Input name

Validations:

  • Must be a String

template_input[description]
optional , nil allowed

Input description

Validations:

  • Must be a String

template_input[required]
optional , nil allowed

Input is required

Validations:

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

template_input[advanced]
optional , nil allowed

Input is advanced

Validations:

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

template_input[input_type]
required

Input type

Validations:

  • Must be one of: user, fact, variable, puppet_parameter.

template_input[fact_name]
optional , nil allowed

Fact name, used when input type is fact

Validations:

  • Must be a String

template_input[variable_name]
optional , nil allowed

Variable name, used when input type is variable

Validations:

  • Must be a String

template_input[puppet_class_name]
optional , nil allowed

Puppet class name, used when input type is puppet_parameter

Validations:

  • Must be a String

template_input[puppet_parameter_name]
optional , nil allowed

Puppet parameter name, used when input type is puppet_parameter

Validations:

  • Must be a String

template_input[options]
optional , nil allowed

Selectable values for user inputs

Validations:

  • Must be an array of any type