这个方法可以用来创建主机.
参数
(对象/数组)
要创建的主机.
另外,对于,该方法接受下列参数
示例
创建主机
Create a host called “Linux server” with an IP interface, add it to a group, link a template to it and set the MAC addresses in the host inventory.
创建一个具有IP接口的“Linux Server”主机,将其添加到主机组中,链接一个模板并且把MAC地址设置到主机资产清单里 请求:
响应:
{
"jsonrpc": "2.0",
"result": {
"107819"
]
}
来源
CHost::create() in frontends/php/include/classes/api/services/CHost.php.