Examples

POST /api/ptables
{
  "ptable": {
    "name": "",
    "layout": "d-i partman-auto/disk"
  }
}
422
{
  "error": {
    "id": null,
    "errors": {
      "name": [
        "can't be blank"
      ]
    },
    "full_messages": [
      "Name can't be blank"
    ]
  }
}

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]
required

Validations:

  • Must be a String

ptable[description]
optional , nil allowed

Validations:

  • Must be a String

ptable[layout]
required

Validations:

  • Must be a String

ptable[snippet]
optional , nil allowed

Validations:

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

ptable[audit_comment]
optional , nil allowed

Validations:

  • Must be a String

ptable[locked]
optional , nil allowed

Whether or not the template is locked for editing

Validations:

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

ptable[os_family]
optional , nil allowed

Validations:

  • Must be a String

ptable[operatingsystem_ids]
optional , nil allowed

Array of operating system IDs to associate with the partition table

Validations:

  • Must be an array of any type

ptable[host_ids]
optional , nil allowed

Array of host IDs to associate with the partition table

Validations:

  • Must be an array of any type

ptable[hostgroup_ids]
optional , nil allowed

Array of host group IDs to associate with the partition table

Validations:

  • Must be an array of any type

ptable[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

ptable[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type