Examples

POST /api/config_templates
{
  "config_template": {}
}
422
{
  "error": {
    "id": null,
    "errors": {
      "name": [
        "can't be blank"
      ],
      "template": [
        "can't be blank"
      ],
      "template_kind_id": [
        "can't be blank"
      ]
    },
    "full_messages": [
      "Name can't be blank",
      "Template can't be blank",
      "Template kind can't be blank"
    ]
  }
}

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

config_template
Required

Validations:

  • Must be a Hash

config_template[name]
Required

název šablony

Validations:

  • Must be a String

config_template[description]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

config_template[template]
Required

Validations:

  • Must be a String

config_template[snippet]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

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

config_template[audit_comment]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

config_template[template_kind_id]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

not relevant for snippet

Validations:

  • Must be a number.

config_template[template_combinations_attributes]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Array of template combinations (hostgroup_id, environment_id)

Validations:

  • Must be an array of any type

config_template[operatingsystem_ids]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Pole identifikátorů operačních systémů které přiřadit šabloně

Validations:

  • Must be an array of any type

config_template[locked]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Zda šablona je či není uzamčena pro úpravy

Validations:

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

config_template[location_ids]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

REPLACE locations with given ids

Validations:

  • Must be an array of any type

config_template[organization_ids]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type