Exemples

POST /api/provisioning_templates
{
  "provisioning_template": {
    "template": "This is a test template",
    "template_kind_id": 131565194,
    "name": "new_template"
  }
}
201
{
  "template": "This is a test template",
  "locked": false,
  "snippet": false,
  "description": null,
  "audit_comment": null,
  "created_at": "2019-11-07 08:44:13 UTC",
  "updated_at": "2019-11-07 08:44:13 UTC",
  "id": 1007981703,
  "name": "new_template",
  "template_kind_id": 131565194,
  "template_kind_name": "PXEGrub",
  "template_combinations": [],
  "operatingsystems": [],
  "os_default_templates": [],
  "locations": [],
  "organizations": []
}

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

provisioning_template
requis

Validations:

  • Must be a Hash

provisioning_template[name]
requis

Nom de modèle

Validations:

  • Must be a String

provisioning_template[description]
optionel , nil autorisé

Validations:

  • Must be a String

provisioning_template[template]
requis

Validations:

  • Must be a String

provisioning_template[snippet]
optionel , nil autorisé

Validations:

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

provisioning_template[audit_comment]
optionel , nil autorisé

Validations:

  • Must be a String

provisioning_template[template_kind_id]
optionel , nil autorisé

n’est pas applicable pour les snippets

Validations:

  • Must be a number.

provisioning_template[template_combinations_attributes]
optionel , nil autorisé

Tableau des combinaisons de modèles (hostgroup_id, environment_id)

Validations:

  • Must be an array of any type

provisioning_template[operatingsystem_ids]
optionel , nil autorisé

Tableau des ID de systèmes d’exploitation associés à ce modèle

Validations:

  • Must be an array of any type

provisioning_template[locked]
optionel , nil autorisé

Indique si le modèle peut être modifié

Validations:

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

provisioning_template[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

provisioning_template[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type