This function allows you to create a hostgroup as defined by the hostgroup data array.
Parameter | Type | Optional | Description | Details |
---|---|---|---|---|
hostgroup data | array or object | Array of Host group objects or a single object | groupid shouldn't be specified |
Parameter | Description |
---|---|
result | Operation successful. Result will contain array of created Host group IDs. groupid are assigned to each Host group object |
error | In case of any errors |
{
"jsonrpc":"2.0",
"method":"hostgroup.create",
"params":[
{"name":"Linux Group"}
],
"auth":"038e1d7b1735c6a5436ee9eae095879e",
"id":3
}
Host group created successfully:
Host group already exists: