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