GET /katello/api/host_collections/:id
显示主机集合

参数

参数名字 描述
id
必填

主机集合 Id

Validations:

  • Must be a number.


GET /katello/api/host_collections
列出主机集合

GET /katello/api/organizations/:organization_id/host_collections
列出机构中的主机集合

GET /katello/api/activation_keys/:activation_key_id/host_collections
列出激活码中的主机集合

参数

参数名字 描述
search
选填

搜索字符串

Validations:

  • String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.

order
选填

Sort field and order, eg. 'id DESC'

Validations:

  • String

full_result
选填

无论如何显示所有结果

Validations:

  • Must be one of: true, false, 1, 0

sort
选填

'order' 参数的哈希版本

Validations:

  • Hash

sort[by]
选填

结果排序字段

Validations:

  • String

sort[order]
选填

如何对分类结果进行排序(例如:ASC 代表升序)

Validations:

  • String

organization_id
选填

机构识别符

Validations:

  • Must be a number.

name
选填

根据其进行过滤的主机集合名称

Validations:

  • String

activation_key_id
选填

激活码识别符

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

host_id
选填

Filter products by host id

Validations:

  • Must be a number.

available_for
选填

Interpret specified object to return only Host Collections that can be associated with specified object. The value 'host' is supported.

Validations:

  • String


POST /katello/api/host_collections
创建主机集合

POST /katello/api/organizations/:organization_id/host_collections
创建主机集合

参数

参数名字 描述
organization_id
必填

机构识别符

Validations:

  • Must be a number.

name
必填

主机集合名称

Validations:

  • String

description
选填

Validations:

  • String

host_ids
选填

List of host ids to replace the hosts in host collection

Validations:

  • Must be an array of any type

max_hosts
选填

Maximum number of hosts in the host collection

Validations:

  • Integer

unlimited_hosts
选填

Whether or not the host collection may have unlimited hosts

Validations:

  • Must be one of: true, false, 1, 0


PUT /katello/api/host_collections/:id
更新主机集合

参数

参数名字 描述
id
必填

主机集合 Id

Validations:

  • Must be a number.

name
选填

主机集合名称

Validations:

  • String

description
选填

Validations:

  • String

host_ids
选填

List of host ids to replace the hosts in host collection

Validations:

  • Must be an array of any type

max_hosts
选填

Maximum number of hosts in the host collection

Validations:

  • Integer

unlimited_hosts
选填

Whether or not the host collection may have unlimited hosts

Validations:

  • Must be one of: true, false, 1, 0


PUT /katello/api/host_collections/:id/add_hosts
Add host to the host collection

参数

参数名字 描述
id
必填

主机集合 Id

Validations:

  • Must be a number.

host_ids
选填

Array of host ids

Validations:

  • Must be an array of any type


PUT /katello/api/host_collections/:id/remove_hosts
Remove hosts from the host collection

参数

参数名字 描述
id
必填

主机集合 Id

Validations:

  • Must be a number.

host_ids
选填

Array of host ids

Validations:

  • Must be an array of any type


DELETE /katello/api/host_collections/:id
消除主机集合

参数

参数名字 描述
id
必填

主机集合 Id

Validations:

  • Must be a number.


POST /katello/api/host_collections/:id/copy
复制主机集合

参数

参数名字 描述
id
必填

主机集合 ID

Validations:

  • Must be a number.

name
必填

新主机集合名称

Validations:

  • String