示例

PUT /api/ptables/1007981738
{
  "ptable": {
    "layout": "new ptable layout"
  }
}
200
{
  "layout": "new ptable layout",
  "locked": false,
  "description": null,
  "os_family": "Redhat",
  "created_at": "2019-11-07 09:07:17 UTC",
  "updated_at": "2019-11-07 09:07:17 UTC",
  "name": "ptable814",
  "id": 1007981738,
  "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
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

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[description]
选填 , 允许空值

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