Im trying to create a maintenance period here. Ive got the correct array, but zabbix gives me this error:
string(92) "API error -32500: SQL statement execution has failed "INSERT INTO timeperiods () VALUES ()"."
Small piece of code:
<?php public function createMaintenance($params = null, $name, $description, $from, $till){ try{ $params['groupids'] = array('23'); $params['name'] = $name; $params['description'] = $description; $params['active_since'] = $from; $params['active_till'] = $till; $params['maintenance_type'] = 0; $params['timeperiods'] = array('timeperiod_type' => 0, 'start_date' => $from, 'period' => 36000); $response = $this->api->maintenanceCreate($params); }catch(Exception $e){ return $e->getMessage(); } return $response; } ?>