GET /api/hosts
列出所有主机

GET /api/hostgroups/:hostgroup_id/hosts
列出主机组中的所有主机

GET /api/locations/:location_id/hosts
列出每个位置的主机

GET /api/organizations/:organization_id/hosts
列出每个机构的主机

GET /api/environments/:environment_id/hosts
列出每个位置的主机

参数

参数名字 描述
thin
选填

只列出主机的 ID 和名称

Validations:

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

hostgroup_id
选填

主机组 ID

Validations:

  • String

location_id
选填

位置 ID

Validations:

  • String

organization_id
选填

机构 ID

Validations:

  • String

environment_id
选填

环境 ID

Validations:

  • String

include
选填

要包含的额外信息类型阵列

Validations:

  • Must be one of: parameters, all_parameters.

search
选填

过滤结果

Validations:

  • String

order
选填

Sort field and order, eg. ‘id DESC’

Validations:

  • String

page
选填

编页结果

Validations:

  • String

per_page
选填

每个请求中的条目数

Validations:

  • String

搜索字段

字段名 类型 可能的值
activation_key string
activation_key_id string
applicable_errata string
applicable_rpms string
architecture string
autoheal boolean
build true, false
class string
comment text
compute_resource string
compute_resource_id integer
config_group string
content_source string
content_view string
content_view_id integer
domain string
domain_id integer
environment string
errata_status security_needed, errata_needed, updated, unknown
facts string
global_status ok, warning, error
has_ip string
has_mac string
host_collection string
host_collection_id integer
hostgroup string
hostgroup_fullname string
hostgroup_id integer
hostgroup_name string
hostgroup_title string
hypervisor boolean
hypervisor_host string
image string
installable_errata string
installed_at datetime
installed_package string
installed_package_name string
ip string
last_checkin datetime
last_report datetime
lifecycle_environment string
lifecycle_environment_id integer
location string
location_id integer
mac string
managed true, false
model string
name string
organization string
organization_id integer
origin string
os string
os_description string
os_id integer
os_major string
os_minor string
os_title string
owner string
owner_id integer
owner_type string
params string
parent_hostgroup string
puppet_ca string
puppet_proxy_id integer
puppetmaster string
realm string
realm_id integer
registered_at datetime
registered_through string
release_version string
service_level string
smart_proxy string
status.applied integer
status.enabled true, false
status.failed integer
status.failed_restarts integer
status.interesting true, false
status.pending integer
status.restarted integer
status.skipped integer
subnet string
subnet.name text
subnet6 string
subnet6.name text
subscription_id string
subscription_name string
subscription_status valid, partial, invalid, unknown, unsubscribed_hypervisor
subscription_uuid string
trace_app string
trace_app_type string
trace_helper string
trace_status reboot_needed, process_restart_needed, updated
upgradable_rpms string
user.firstname string
user.lastname string
user.login string
user.mail string
usergroup string
usergroup.name string
uuid string

GET /api/hosts/:id
显示主机

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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

show_hidden_parameters
选填

显示隐藏的参数值

Validations:

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


POST /api/hosts
创建主机

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

host
必填

Validations:

  • Hash

host[name]
必填

Validations:

  • String

host[location_id]
必填

如果启用位置则需填写。

Validations:

  • Must be a number.

host[organization_id]
必填

如果启用机构则需要填写

Validations:

  • Must be a number.

host[environment_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • String

host[ip]
选填 , 允许空值

如果使用附带 DHCP 代理服务器的子网则不需要

Validations:

  • String

host[mac]
选填 , 允许空值

如果管理的主机为裸机则需要填写,如果为虚拟机,则不需要。

Validations:

  • String

host[architecture_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[domain_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[realm_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[puppet_proxy_id]
选填 , 允许空值

Puppet 代理服务器 ID

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA 代理服务器 ID

Validations:

  • Must be a number.

host[puppetclass_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

host[config_group_ids]
选填 , 允许空值

关联配置组的 ID

Validations:

  • Must be an array of any type

host[operatingsystem_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • String

host[medium_id]
选填 , 允许空值

如果不是基于置备的映像,且用于管理主机,同时数值不是来自主机组,则需要填写。

Validations:

  • String

host[pxe_loader]
选填 , 允许空值

DHCP 文件名选项(默认为 Grub2/PXELinux)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub2 UEFI, Grub2 UEFI SecureBoot.

host[ptable_id]
选填 , 允许空值

如果已管理主机,且未定义自定义分区,则需填写。

Validations:

  • Must be a number.

host[subnet_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[compute_resource_id]
选填 , 允许空值

nil 说明主机是裸机

Validations:

  • Must be a number.

host[root_pass]
选填 , 允许空值

如果已管理主机,且数值不是从主机组或设置中的默认密码继承,则需填写。

Validations:

  • String

host[model_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[hostgroup_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[owner_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[owner_type]
选填 , 允许空值

主机拥有者类型

Validations:

  • Must be one of: User, Usergroup.

host[image_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[host_parameters_attributes]
选填 , 允许空值

主机参数(阵列或索引哈希)

Validations:

  • Must be an Array of nested elements

host[host_parameters_attributes][name]
必填

参数名称

Validations:

  • String

host[host_parameters_attributes][value]
必填

参数值

Validations:

  • String

host[build]
选填 , 允许空值

Validations:

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

host[enabled]
选填 , 允许空值

将这个主机包含在 Foreman 报告中

Validations:

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

host[provision_method]
选填 , 允许空值

此方法用于置备主机。

Validations:

  • Must be one of: build, image.

host[managed]
选填 , 允许空值

用来表示主机被管理或没有被管理的 True/False 标签。注:这个值还决定是否需要一些参数。

Validations:

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

host[progress_report_id]
选填 , 允许空值

用来跟踪业务流程任务状态的 UUID,GET /api/orchestration/:UUID/tasks

Validations:

  • String

host[comment]
选填 , 允许空值

有关主机的附加信息

Validations:

  • String

host[capabilities]
选填 , 允许空值

Validations:

  • String

host[compute_profile_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[interfaces_attributes]
选填 , 允许空值

主机的网络接口。

Validations:

  • Must be an Array of nested elements

host[interfaces_attributes][mac]
选填 , 允许空值

接口的 MAC 地址。在裸机中管理的接口需要这个地址。

Validations:

  • String

host[interfaces_attributes][ip]
选填 , 允许空值

接口的 IPv4 地址

Validations:

  • String

host[interfaces_attributes][ip6]
选填 , 允许空值

接口的 IPv6 地址

Validations:

  • String

host[interfaces_attributes][type]
选填 , 允许空值

接口类型,例如:bmc。默认为 interface

Validations:

  • Must be one of: interface, bmc, bond, bridge.

host[interfaces_attributes][name]
选填 , 允许空值

接口 DNS 名称

Validations:

  • String

host[interfaces_attributes][subnet_id]
选填 , 允许空值

IPv4 接口的 Foreman 子网 ID

Validations:

  • Must be a number.

host[interfaces_attributes][subnet6_id]
选填 , 允许空值

IPv6 接口的 Foreman 子网 ID

Validations:

  • Must be a number.

host[interfaces_attributes][domain_id]
选填 , 允许空值

接口的 Foreman 域 ID。所管理主机中的主接口需要这个选项。

Validations:

  • Must be a number.

host[interfaces_attributes][identifier]
选填 , 允许空值

设备标识符,例如:eth0 或者 eth1.1。

Validations:

  • String

host[interfaces_attributes][managed]
选填 , 允许空值

这个接口应由 DHCP 管理还是由 DNS 智能代理服务器管理?是否应在预配过程中对其进行配置?

Validations:

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

host[interfaces_attributes][primary]
选填 , 允许空值

是否应该使用这个接口构建该主机的 FQDN?每台管理的主机都需要有一个主接口。

Validations:

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

host[interfaces_attributes][provision]
选填 , 允许空值

这个接口是否应该用于 PXELinux 的 TFTP(或基于映象主机的 SSH)?每台管理的主机需要有一个预配接口。

Validations:

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

host[interfaces_attributes][username]
选填 , 允许空值

仅用于 BMC 接口

Validations:

  • String

host[interfaces_attributes][password]
选填 , 允许空值

仅用于 BMC 接口

Validations:

  • String

host[interfaces_attributes][provider]
选填 , 允许空值

接口提供者,例如 IPMI。仅用于 BMC 接口。

Validations:

  • Must be one of: IPMI, SSH.

host[interfaces_attributes][virtual]
选填 , 允许空值

别名或 VLAN 失败

Validations:

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

host[interfaces_attributes][tag]
选填 , 允许空值

VLAN 标签,这个属性优先于子网 VLAN ID。仅用于虚拟接口。

Validations:

  • String

host[interfaces_attributes][mtu]
选填 , 允许空值

MTU, this attribute has precedence over the subnet MTU.

Validations:

  • Integer

host[interfaces_attributes][attached_to]
选填 , 允许空值

这个接口所属接口识别符,例如:eth1。仅用于虚拟接口。

Validations:

  • String

host[interfaces_attributes][mode]
选填 , 允许空值

接口的捆绑模式,例如:balance-rr。仅用于捆绑接口。

Validations:

  • Must be one of: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb.

host[interfaces_attributes][attached_devices]
选填 , 允许空值

附加接口的识别符,例如:`['eth1', 'eth2']`。对于捆绑的接口,那些是从属接口。仅用于捆绑和桥接接口。

Validations:

  • Must be an array of any type

host[interfaces_attributes][bond_options]
选填 , 允许空值

使用空格分隔的选项,例如:miimon=100。仅用于捆绑接口。

Validations:

  • String

host[interfaces_attributes][compute_attributes]
选填 , 允许空值

该接口的附加计算资源具体属性。

Validations:

  • Hash

host[compute_attributes]
选填 , 允许空值

附加计算资源的具体属性。

Validations:

  • Hash

host[content_facet_attributes]
选填 , 允许空值

Parameters for host's content_facet facet

Validations:

  • Hash

host[content_facet_attributes][content_view_id]
选填 , 允许空值

Validations:

  • Integer

host[content_facet_attributes][lifecycle_environment_id]
选填 , 允许空值

Validations:

  • Integer

host[content_facet_attributes][content_source_id]
选填 , 允许空值

Validations:

  • Integer

host[content_facet_attributes][kickstart_repository_id]
选填 , 允许空值

Repository Id associated with the kickstart repo used for provisioning

Validations:

  • Integer

host[subscription_facet_attributes]
选填 , 允许空值

Parameters for host's subscription_facet facet

Validations:

  • Hash

host[subscription_facet_attributes][release_version]
选填 , 允许空值

Release version for this Host to use (7Server, 7.1, etc)

Validations:

  • String

host[subscription_facet_attributes][autoheal]
选填 , 允许空值

Sets whether the Host will autoheal subscriptions upon checkin

Validations:

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

host[subscription_facet_attributes][service_level]
选填 , 允许空值

Service level to be used for autoheal.

Validations:

  • Integer

host[subscription_facet_attributes][hypervisor_guest_uuids]
选填 , 允许空值

List of hypervisor guest uuids

Validations:

  • Must be an array of any type

host[subscription_facet_attributes][installed_products_attributes]
选填 , 允许空值

List of products installed on the host

Validations:

  • Must be an Array of nested elements

host[subscription_facet_attributes][installed_products_attributes][product_id]
选填 , 允许空值

Product id as listed from a host's installed products, this is not the same product id as the products api returns

Validations:

  • String

host[subscription_facet_attributes][installed_products_attributes][product_name]
选填 , 允许空值

Product name as listed from a host's installed products

Validations:

  • String

host[subscription_facet_attributes][installed_products_attributes][arch]
选填 , 允许空值

Product architecture

Validations:

  • String

host[subscription_facet_attributes][installed_products_attributes][version]
选填 , 允许空值

Product version

Validations:

  • String


PUT /api/hosts/:id
更新主机

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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

host
必填

Validations:

  • Hash

host[name]
选填

Validations:

  • String

host[location_id]
选填

如果启用位置则需填写。

Validations:

  • Must be a number.

host[organization_id]
选填

如果启用机构则需要填写

Validations:

  • Must be a number.

host[environment_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • String

host[ip]
选填 , 允许空值

如果使用附带 DHCP 代理服务器的子网则不需要

Validations:

  • String

host[mac]
选填 , 允许空值

如果管理的主机为裸机则需要填写,如果为虚拟机,则不需要。

Validations:

  • String

host[architecture_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[domain_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[realm_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[puppet_proxy_id]
选填 , 允许空值

Puppet 代理服务器 ID

Validations:

  • Must be a number.

host[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA 代理服务器 ID

Validations:

  • Must be a number.

host[puppetclass_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

host[config_group_ids]
选填 , 允许空值

关联配置组的 ID

Validations:

  • Must be an array of any type

host[operatingsystem_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • String

host[medium_id]
选填 , 允许空值

如果不是基于置备的映像,且用于管理主机,同时数值不是来自主机组,则需要填写。

Validations:

  • String

host[pxe_loader]
选填 , 允许空值

DHCP 文件名选项(默认为 Grub2/PXELinux)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub2 UEFI, Grub2 UEFI SecureBoot.

host[ptable_id]
选填 , 允许空值

如果已管理主机,且未定义自定义分区,则需填写。

Validations:

  • Must be a number.

host[subnet_id]
选填 , 允许空值

如果已管理主机,且数值不是从主机组中继承,则需填写。

Validations:

  • Must be a number.

host[compute_resource_id]
选填 , 允许空值

nil 说明主机是裸机

Validations:

  • Must be a number.

host[root_pass]
选填 , 允许空值

如果已管理主机,且数值不是从主机组或设置中的默认密码继承,则需填写。

Validations:

  • String

host[model_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[hostgroup_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[owner_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[owner_type]
选填 , 允许空值

主机拥有者类型

Validations:

  • Must be one of: User, Usergroup.

host[image_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[host_parameters_attributes]
选填 , 允许空值

主机参数(阵列或索引哈希)

Validations:

  • Must be an Array of nested elements

host[host_parameters_attributes][name]
选填

参数名称

Validations:

  • String

host[host_parameters_attributes][value]
选填

参数值

Validations:

  • String

host[build]
选填 , 允许空值

Validations:

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

host[enabled]
选填 , 允许空值

将这个主机包含在 Foreman 报告中

Validations:

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

host[provision_method]
选填 , 允许空值

此方法用于置备主机。

Validations:

  • Must be one of: build, image.

host[managed]
选填 , 允许空值

用来表示主机被管理或没有被管理的 True/False 标签。注:这个值还决定是否需要一些参数。

Validations:

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

host[progress_report_id]
选填 , 允许空值

用来跟踪业务流程任务状态的 UUID,GET /api/orchestration/:UUID/tasks

Validations:

  • String

host[comment]
选填 , 允许空值

有关主机的附加信息

Validations:

  • String

host[capabilities]
选填 , 允许空值

Validations:

  • String

host[compute_profile_id]
选填 , 允许空值

Validations:

  • Must be a number.

host[interfaces_attributes]
选填 , 允许空值

主机的网络接口。

Validations:

  • Must be an Array of nested elements

host[interfaces_attributes][mac]
选填 , 允许空值

接口的 MAC 地址。在裸机中管理的接口需要这个地址。

Validations:

  • String

host[interfaces_attributes][ip]
选填 , 允许空值

接口的 IPv4 地址

Validations:

  • String

host[interfaces_attributes][ip6]
选填 , 允许空值

接口的 IPv6 地址

Validations:

  • String

host[interfaces_attributes][type]
选填 , 允许空值

接口类型,例如:bmc。默认为 interface

Validations:

  • Must be one of: interface, bmc, bond, bridge.

host[interfaces_attributes][name]
选填 , 允许空值

接口 DNS 名称

Validations:

  • String

host[interfaces_attributes][subnet_id]
选填 , 允许空值

IPv4 接口的 Foreman 子网 ID

Validations:

  • Must be a number.

host[interfaces_attributes][subnet6_id]
选填 , 允许空值

IPv6 接口的 Foreman 子网 ID

Validations:

  • Must be a number.

host[interfaces_attributes][domain_id]
选填 , 允许空值

接口的 Foreman 域 ID。所管理主机中的主接口需要这个选项。

Validations:

  • Must be a number.

host[interfaces_attributes][identifier]
选填 , 允许空值

设备标识符,例如:eth0 或者 eth1.1。

Validations:

  • String

host[interfaces_attributes][managed]
选填 , 允许空值

这个接口应由 DHCP 管理还是由 DNS 智能代理服务器管理?是否应在预配过程中对其进行配置?

Validations:

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

host[interfaces_attributes][primary]
选填 , 允许空值

是否应该使用这个接口构建该主机的 FQDN?每台管理的主机都需要有一个主接口。

Validations:

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

host[interfaces_attributes][provision]
选填 , 允许空值

这个接口是否应该用于 PXELinux 的 TFTP(或基于映象主机的 SSH)?每台管理的主机需要有一个预配接口。

Validations:

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

host[interfaces_attributes][username]
选填 , 允许空值

仅用于 BMC 接口

Validations:

  • String

host[interfaces_attributes][password]
选填 , 允许空值

仅用于 BMC 接口

Validations:

  • String

host[interfaces_attributes][provider]
选填 , 允许空值

接口提供者,例如 IPMI。仅用于 BMC 接口。

Validations:

  • Must be one of: IPMI, SSH.

host[interfaces_attributes][virtual]
选填 , 允许空值

别名或 VLAN 失败

Validations:

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

host[interfaces_attributes][tag]
选填 , 允许空值

VLAN 标签,这个属性优先于子网 VLAN ID。仅用于虚拟接口。

Validations:

  • String

host[interfaces_attributes][mtu]
选填 , 允许空值

MTU, this attribute has precedence over the subnet MTU.

Validations:

  • Integer

host[interfaces_attributes][attached_to]
选填 , 允许空值

这个接口所属接口识别符,例如:eth1。仅用于虚拟接口。

Validations:

  • String

host[interfaces_attributes][mode]
选填 , 允许空值

接口的捆绑模式,例如:balance-rr。仅用于捆绑接口。

Validations:

  • Must be one of: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb.

host[interfaces_attributes][attached_devices]
选填 , 允许空值

附加接口的识别符,例如:`['eth1', 'eth2']`。对于捆绑的接口,那些是从属接口。仅用于捆绑和桥接接口。

Validations:

  • Must be an array of any type

host[interfaces_attributes][bond_options]
选填 , 允许空值

使用空格分隔的选项,例如:miimon=100。仅用于捆绑接口。

Validations:

  • String

host[interfaces_attributes][compute_attributes]
选填 , 允许空值

该接口的附加计算资源具体属性。

Validations:

  • Hash

host[compute_attributes]
选填 , 允许空值

附加计算资源的具体属性。

Validations:

  • Hash

host[content_facet_attributes]
选填 , 允许空值

Parameters for host's content_facet facet

Validations:

  • Hash

host[content_facet_attributes][content_view_id]
选填 , 允许空值

Validations:

  • Integer

host[content_facet_attributes][lifecycle_environment_id]
选填 , 允许空值

Validations:

  • Integer

host[content_facet_attributes][content_source_id]
选填 , 允许空值

Validations:

  • Integer

host[content_facet_attributes][kickstart_repository_id]
选填 , 允许空值

Repository Id associated with the kickstart repo used for provisioning

Validations:

  • Integer

host[subscription_facet_attributes]
选填 , 允许空值

Parameters for host's subscription_facet facet

Validations:

  • Hash

host[subscription_facet_attributes][release_version]
选填 , 允许空值

Release version for this Host to use (7Server, 7.1, etc)

Validations:

  • String

host[subscription_facet_attributes][autoheal]
选填 , 允许空值

Sets whether the Host will autoheal subscriptions upon checkin

Validations:

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

host[subscription_facet_attributes][service_level]
选填 , 允许空值

Service level to be used for autoheal.

Validations:

  • Integer

host[subscription_facet_attributes][hypervisor_guest_uuids]
选填 , 允许空值

List of hypervisor guest uuids

Validations:

  • Must be an array of any type

host[subscription_facet_attributes][installed_products_attributes]
选填 , 允许空值

List of products installed on the host

Validations:

  • Must be an Array of nested elements

host[subscription_facet_attributes][installed_products_attributes][product_id]
选填 , 允许空值

Product id as listed from a host's installed products, this is not the same product id as the products api returns

Validations:

  • String

host[subscription_facet_attributes][installed_products_attributes][product_name]
选填 , 允许空值

Product name as listed from a host's installed products

Validations:

  • String

host[subscription_facet_attributes][installed_products_attributes][arch]
选填 , 允许空值

Product architecture

Validations:

  • String

host[subscription_facet_attributes][installed_products_attributes][version]
选填 , 允许空值

Product version

Validations:

  • String


DELETE /api/hosts/:id
删除主机

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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


GET /api/hosts/:id/enc
获取主机的 ENC 值

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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


GET /api/hosts/:id/status
获取主机配置状态

Return value may either be one of the following:

  • Alerts disabled

  • No reports

  • Error

  • Out of sync

  • Active

  • Pending

  • No changes

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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


GET /api/hosts/:id/status/:type
获取主机状态

Returns string representing a host status of a given type

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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

type
必填

状态类型,可为以下之一

  • global

  • configuration

  • build

Validations:

  • Must be one of: HostStatus::Global, configuration, build.


GET /api/hosts/:id/vm_compute_attributes
获取主机 vm 属性

Return the host's compute attributes that can be used to create a clone of this VM

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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


PUT /api/hosts/:id/disassociate
取消该主机与 VM 的关联

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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


PUT /api/hosts/:id/power
在主机中运行电源操作

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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

power_action
必填

电源操作,有效操作为 (on/start), (off/stop), (soft/reboot), (cycle/reset), (state/status)。

Validations:

  • String


PUT /api/hosts/:id/boot
使用指定设备引导主机

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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

device
必填

引导设备,有效设备为磁盘、光盘、pxe、bios。

Validations:

  • String


POST /api/hosts/facts
上传主机的系统详情,如需要,请创建主机。

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

name
必填

主机的主机名

Validations:

  • String

facts
必填

包含主机详情的哈希

Validations:

  • Hash

certname
选填

自选:主机的证书名

Validations:

  • String

type
选填

自选:要创建主机的 STI 类型

Validations:

  • String


PUT /api/hosts/:id/rebuild_config
重建业务流程配置

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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

only
选填

限制重建步骤,有效步骤是 DHCP, DNS, TFTP

Validations:

  • Must be an array of any type


GET /api/hosts/:id/template/:kind
预览呈现的预配模板内容

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

id
必填

Validations:

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

kind
必填

模板类型,可用值:

Validations:

  • String


PUT /api/hosts/:host_id/host_collections
Alter a hosts host collections

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Integer

host_id
必填

The id of the host to alter

Validations:

  • Must be a number.

host_collection_ids
必填

List of host collection ids to update

Validations:

  • Must be an array of any type