Examples

POST /api/templates/1007981706-report_template137/template_inputs
{
  "template_input": {}
}
422
{
  "error": {
    "id": null,
    "errors": {
      "name": [
        "can't be blank"
      ],
      "input_type": [
        "can't be blank",
        "is not included in the list"
      ]
    },
    "full_messages": [
      "Name can't be blank",
      "Input type can't be blank",
      "Input type is not included in the list"
    ]
  }
}

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 , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Input description

Validations:

  • Must be a String

template_input[required]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Input is required

Validations:

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

template_input[advanced]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

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 , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Fact name, used when input type is fact

Validations:

  • Must be a String

template_input[variable_name]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Variable name, used when input type is variable

Validations:

  • Must be a String

template_input[puppet_class_name]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Puppet class name, used when input type is puppet_parameter

Validations:

  • Must be a String

template_input[puppet_parameter_name]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Puppet parameter name, used when input type is puppet_parameter

Validations:

  • Must be a String

template_input[options]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Selectable values for user inputs

Validations:

  • Must be an array of any type

template_input[value_type]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Value type, defaults to plain

Validations:

  • Must be one of: plain, search, date.

template_input[resource_type]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

For values of type search, this is the resource the value searches in

Validations:

  • Must be one of: Architecture, Audit, AuthSource, Bookmark, ComputeProfile, ComputeResource, ConfigGroup, Domain, Environment, ExternalUsergroup, FactValue, Filter, Host, HostClass, Hostgroup, HttpProxy, Image, KeyPair, Location, MailNotification, Medium, Model, Operatingsystem, Organization, Parameter, PersonalAccessToken, ProvisioningTemplate, Ptable, Puppetclass, PuppetclassLookupKey, Realm, Report, ReportTemplate, Role, Setting, SmartProxy, SshKey, Subnet, Trend, User, Usergroup, VariableLookupKey.