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

Validations:

  • Must be a String

ptable[layout]
Required

Validations:

  • Must be a String

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

Validations:

  • Must be a String

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

Of de template wel of niet is gelocked voor bewerken

Validations:

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

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

Validations:

  • Must be a String

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

Array van besturingssysteem IDs om te associeren met de partitie tabel

Validations:

  • Must be an array of any type

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

Array van host IDs om te associeren met de partitie tabel

Validations:

  • Must be an array of any type

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

Array van host groep IDs om te associeren met de partitie tabel

Validations:

  • Must be an array of any type

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

Vervang locaties met de opgegeven ids

Validations:

  • Must be an array of any type

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

Vervang organisaties met de opgegeven ids.

Validations:

  • Must be an array of any type