Examples

POST /api/ptables
{
  "ptable": {
    "name": "W",
    "layout": "d-i partman-auto/disk"
  }
}
201
{
  "layout": "d-i partman-auto/disk",
  "locked": false,
  "os_family": null,
  "created_at": "2019-09-11 14:34:42 UTC",
  "updated_at": "2019-09-11 14:34:42 UTC",
  "name": "W",
  "id": 1007981781,
  "operatingsystems": [],
  "locations": [],
  "organizations": []
}

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

ptable
Required

Validations:

  • Must be a Hash

ptable[name]
Required

Validations:

  • Must be a String

ptable[layout]
Required

Validations:

  • Must be a String

ptable[snippet]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

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

ptable[audit_comment]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

ptable[locked]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Whether or not the template is locked for editing

Validations:

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

ptable[os_family]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

ptable[operatingsystem_ids]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Array of operating system IDs to associate with the partition table

Validations:

  • Must be an array of any type

ptable[host_ids]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Array of host IDs to associate with the partition table

Validations:

  • Must be an array of any type

ptable[hostgroup_ids]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Array of host group IDs to associate with the partition table

Validations:

  • Must be an array of any type

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

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type