示例

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": []
}

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

ptable
必填

Validations:

  • Must be a Hash

ptable[name]
必填

Validations:

  • Must be a String

ptable[layout]
必填

Validations:

  • Must be a String

ptable[snippet]
選填 , 允許空值

Validations:

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

ptable[audit_comment]
選填 , 允許空值

Validations:

  • Must be a String

ptable[locked]
選填 , 允許空值

範本是否鎖定並禁止進行編輯

Validations:

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

ptable[os_family]
選填 , 允許空值

Validations:

  • Must be a String

ptable[operatingsystem_ids]
選填 , 允許空值

與分割表相關連的作業系統 ID 之陣列

Validations:

  • Must be an array of any type

ptable[host_ids]
選填 , 允許空值

與分割表相關的主機 ID 陣列

Validations:

  • Must be an array of any type

ptable[hostgroup_ids]
選填 , 允許空值

與分割表相關連的主機群組 ID 之陣列

Validations:

  • Must be an array of any type

ptable[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

ptable[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type