Esempi

POST /api/ptables/import
{
  "ptable": {
    "name": "ptable212",
    "template": "b"
  }
}
201
{
  "template": "b",
  "name": "ptable212",
  "id": 1007981800,
  "snippet": false,
  "template_kind_id": null,
  "created_at": "2019-09-11T14:34:42.858Z",
  "updated_at": "2019-09-11T14:34:42.873Z",
  "locked": false,
  "default": false,
  "vendor": null,
  "os_family": "Redhat"
}

Parametri

Nome parametro Descrizione
location_id
opzionale

Scopo per posizioni

Validations:

  • Must be a Integer

organization_id
opzionale

Scopo per organizzazioni

Validations:

  • Must be a Integer

ptable
richiesto

Validations:

  • Must be a Hash

ptable[name]
opzionale

nome template

Validations:

  • Must be a String

ptable[template]
opzionale

template contents including metadata

Validations:

  • Must be a String

ptable[location_ids]
opzionale , consentito nil

SOSTITUIRE le posizioni con gli id dati

Validations:

  • Must be an array of any type

ptable[organization_ids]
opzionale , consentito nil

SOSTITUIRE le organizzazioni con gli id dati

Validations:

  • Must be an array of any type

options
opzionale

Validations:

  • Must be a Hash

options[force]
opzionale , consentito nil

use if you want update locked templates

Validations:

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

options[associate]
opzionale , consentito nil

determines when the template should associate objects based on metadata, new means only when new template is being created, always means both for new and existing template which is only being updated, never ignores metadata

Validations:

  • Must be one of: new, always, never.

options[lock]
opzionale , consentito nil

lock imported templates (false by default)

Validations:

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

options[default]
opzionale , consentito nil

makes the template default meaning it will be automatically associated with newly created organizations and locations (false by default)

Validations:

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