Ejemplos

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"
    ]
  }
}

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

config_template
requerido

Validations:

  • Must be a Hash

config_template[name]
requerido

nombre de plantilla

Validations:

  • Must be a String

config_template[description]
opcional , nil permitido

Validations:

  • Must be a String

config_template[template]
requerido

Validations:

  • Must be a String

config_template[snippet]
opcional , nil permitido

Validations:

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

config_template[audit_comment]
opcional , nil permitido

Validations:

  • Must be a String

config_template[template_kind_id]
opcional , nil permitido

no es relevante para ‘snippet’

Validations:

  • Must be a number.

config_template[template_combinations_attributes]
opcional , nil permitido

Array de combinaciones de plantillas (hostgroup_id, environment_id)

Validations:

  • Must be an array of any type

config_template[operatingsystem_ids]
opcional , nil permitido

Array de ID de sistemas operativos a asociar con la plantilla

Validations:

  • Must be an array of any type

config_template[locked]
opcional , nil permitido

Si la plantilla está bloqueada o no para edición

Validations:

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

config_template[location_ids]
opcional , nil permitido

REMPLAZAR ubicaciones con ID dadas

Validations:

  • Must be an array of any type

config_template[organization_ids]
opcional , nil permitido

REMPLAZAR organizaciones con ID dadas.

Validations:

  • Must be an array of any type