HI,
I am working on a script in php to create a host group and some hosts.
When i use my script i have :API error -32500: No permissions to referred object or it does not exist!
I work with zabbix 3.2.
When i create an host with an other group, it works.
Someone have a solution ?
a part of my code
try {//créer un groupe (parking) regroupant tous les hotes (gates)
$api->hostgroupCreate(array('name' => "parking$param_name"));
$error = FALSE;
} catch (Exception $e) {
echo $e->getMessage();
$error = TRUE;
}
try {
$api->hostCreate(array('host' => "gate$name_host", 'interfaces' => $param_net, 'groups' => array('groupid' => $id_group), 'templates' => array('templateid' => $id_template), 'invertory_mode' => -1));
$error = FALSE;
} catch (Exception $e) {
echo $e->getMessage();
$error = TRUE;
}
I am working on a script in php to create a host group and some hosts.
When i use my script i have :API error -32500: No permissions to referred object or it does not exist!
I work with zabbix 3.2.
When i create an host with an other group, it works.
Someone have a solution ?

a part of my code
try {//créer un groupe (parking) regroupant tous les hotes (gates)
$api->hostgroupCreate(array('name' => "parking$param_name"));
$error = FALSE;
} catch (Exception $e) {
echo $e->getMessage();
$error = TRUE;
}
try {
$api->hostCreate(array('host' => "gate$name_host", 'interfaces' => $param_net, 'groups' => array('groupid' => $id_group), 'templates' => array('templateid' => $id_template), 'invertory_mode' => -1));
$error = FALSE;
} catch (Exception $e) {
echo $e->getMessage();
$error = TRUE;
}
Comment