Examples

POST /api/ptables/import
{
  "ptable": {
    "name": "ptable824",
    "template": "b"
  }
}
201
{
  "template": "b",
  "name": "ptable824",
  "id": 1007981749,
  "snippet": false,
  "description": null,
  "template_kind_id": null,
  "created_at": "2019-11-07T09:07:18.340Z",
  "updated_at": "2019-11-07T09:07:18.356Z",
  "locked": false,
  "default": false,
  "vendor": null,
  "os_family": "Redhat"
}

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

ptable
Required

Validations:

  • Must be a Hash

ptable[name]
Optional

mallnamn

Validations:

  • Must be a String

ptable[template]
Optional

template contents including metadata

Validations:

  • Must be a String

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

REPLACE locations with given ids

Validations:

  • Must be an array of any type

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

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type

options
Optional

Validations:

  • Must be a Hash

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

use if you want update locked templates

Validations:

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

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

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

lock imported templates (false by default)

Validations:

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

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

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.