GET /api/ptables
列出所有分区表

GET /api/operatingsystems/:operatingsystem_id/ptables
列出操作系统的所有分区表

GET /api/locations/:location_id/ptables
列出每个位置的所有分区表

GET /api/organizations/:organization_id/ptables
列出每个机构的所有分区表

参数

参数名字 描述
operatingsystem_id
选填

操作系统 ID

Validations:

  • Must be a String

location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

结果排序

Validations:

  • Must be a String

page
选填

编页结果

Validations:

  • Must be a String

per_page
选填

每个请求中的条目数

Validations:

  • Must be a String


GET /api/ptables/:id
显示分区表

参数

参数名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/ptables
创建分区表

参数

参数名字 描述
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


GET /api/ptables/revision

参数

参数名字 描述
version
选填

模板版本

Validations:

  • Must be a String


PUT /api/ptables/:id
更新分区表

参数

参数名字 描述
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


DELETE /api/ptables/:id
删除分区表

参数

参数名字 描述
id
必填

Validations:

  • Must be a String


POST /api/ptables/:id/clone
克隆模板

参数

参数名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

ptable
必填

Validations:

  • Must be a Hash

ptable[name]
必填

模板名称

Validations:

  • Must be a String


GET /api/ptables/:id/export
导出分区模板到 ERB

参数

参数名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.