示例

PUT /api/ptables/1007981787-ptable201
{
  "ptable": {
    "audit_comment": "aha",
    "template": "tmp"
  }
}
200
{
  "layout": "tmp",
  "locked": false,
  "os_family": "Redhat",
  "created_at": "2019-09-11 14:34:42 UTC",
  "updated_at": "2019-09-11 14:34:42 UTC",
  "name": "ptable201",
  "id": 1007981787,
  "operatingsystems": [],
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be a String

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