GET /api/hostgroups
List all host groups

GET /api/puppetclasses/:puppetclass_id/hostgroups
List all host groups for a Puppet class

GET /api/locations/:location_id/hostgroups
List all host groups per location

GET /api/organizations/:organization_id/hostgroups
List all host groups per organization

参数

参数名字 描述
puppetclass_id
选填

ID of Puppet class

Validations:

  • Must be String

location_id
选填

Scope by locations

Validations:

  • Must be Integer

organization_id
选填

Scope by organizations

Validations:

  • Must be Integer

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
Show a host group

参数

参数名字 描述
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
Create a host group

参数

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

hostgroup[location_ids]
选填 , 允许空值

REPLACE locations with given ids

Validations:

  • Must be an array of any type

hostgroup[organization_ids]
选填 , 允许空值

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/hostgroups/:id
Update a host group

参数

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

hostgroup[location_ids]
选填 , 允许空值

REPLACE locations with given ids

Validations:

  • Must be an array of any type

hostgroup[organization_ids]
选填 , 允许空值

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


DELETE /api/hostgroups/:id
Delete a host group

参数

参数名字 描述
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
Clone a host group

参数

参数名字 描述
name
必填

Validations:

  • Must be String