GET /api/hostgroups
列出所有主机组

GET /api/puppetclasses/:puppetclass_id/hostgroups
列出 Puppet 分类的所有主机组

GET /api/locations/:location_id/hostgroups
列出每个位置的所有主机组

GET /api/organizations/:organization_id/hostgroups
列出每个机构的所有主机组

参数

参数名字 描述
puppetclass_id
选填

Puppet 分类 ID

Validations:

  • Must be String

search
选填

过滤结果

Validations:

  • Must be String

order
选填

结果排序

Validations:

  • Must be String

page
选填

页数

Validations:

  • Must be String

per_page
选填

每个请求中的条目数

Validations:

  • Must be String


GET /api/hostgroups/: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/hostgroups
生成主机组

参数

参数名字 描述
hostgroup
必填

Validations:

  • Must be a Hash

hostgroup[name]
必填

Name of the host group

Validations:

  • Must be String

hostgroup[parent_id]
选填 , 允许空值

Parent ID of the host group

Validations:

  • Must be a number.

hostgroup[environment_id]
选填 , 允许空值

Environment ID

Validations:

  • Must be a number.

hostgroup[compute_profile_id]
选填 , 允许空值

Compute profile ID

Validations:

  • Must be a number.

hostgroup[operatingsystem_id]
选填 , 允许空值

Operating system ID

Validations:

  • Must be a number.

hostgroup[architecture_id]
选填 , 允许空值

Architecture ID

Validations:

  • Must be a number.

hostgroup[medium_id]
选填 , 允许空值

Media ID

Validations:

  • Must be a number.

hostgroup[ptable_id]
选填 , 允许空值

Partition table ID

Validations:

  • Must be a number.

hostgroup[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA proxy ID

Validations:

  • Must be a number.

hostgroup[subnet_id]
选填 , 允许空值

Subnet ID

Validations:

  • Must be a number.

hostgroup[domain_id]
选填 , 允许空值

Domain ID

Validations:

  • Must be a number.

hostgroup[realm_id]
选填 , 允许空值

Realm ID

Validations:

  • Must be a number.

hostgroup[puppet_proxy_id]
选填 , 允许空值

Puppet proxy ID

Validations:

  • Must be a number.

hostgroup[root_pass]
选填 , 允许空值

Root password on provisioned hosts

Validations:

  • Must be String


PUT /api/hostgroups/: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.

hostgroup
必填

Validations:

  • Must be a Hash

hostgroup[name]
选填

Name of the host group

Validations:

  • Must be String

hostgroup[parent_id]
选填 , 允许空值

Parent ID of the host group

Validations:

  • Must be a number.

hostgroup[environment_id]
选填 , 允许空值

Environment ID

Validations:

  • Must be a number.

hostgroup[compute_profile_id]
选填 , 允许空值

Compute profile ID

Validations:

  • Must be a number.

hostgroup[operatingsystem_id]
选填 , 允许空值

Operating system ID

Validations:

  • Must be a number.

hostgroup[architecture_id]
选填 , 允许空值

Architecture ID

Validations:

  • Must be a number.

hostgroup[medium_id]
选填 , 允许空值

Media ID

Validations:

  • Must be a number.

hostgroup[ptable_id]
选填 , 允许空值

Partition table ID

Validations:

  • Must be a number.

hostgroup[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA proxy ID

Validations:

  • Must be a number.

hostgroup[subnet_id]
选填 , 允许空值

Subnet ID

Validations:

  • Must be a number.

hostgroup[domain_id]
选填 , 允许空值

Domain ID

Validations:

  • Must be a number.

hostgroup[realm_id]
选填 , 允许空值

Realm ID

Validations:

  • Must be a number.

hostgroup[puppet_proxy_id]
选填 , 允许空值

Puppet proxy ID

Validations:

  • Must be a number.

hostgroup[root_pass]
选填 , 允许空值

Root password on provisioned hosts

Validations:

  • Must be String


DELETE /api/hostgroups/: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/hostgroups/:id/clone
克隆主机组

参数

参数名字 描述
name
必填

Validations:

  • Must be String