-
Incident report
-
Resolution: Duplicate
-
Trivial
-
None
-
2.5.0
1. Let's say we call httptest.create with only required parameters like so:
API::HttpTest()->create(array( 'name' => 'test httptest.create', 'hostid' => '10244', 'steps' => array( array( 'name' => 'homepage', 'url' => 'http://homepage.com', 'no' => 1 ) ) ));
We'll get undefined indexes from where we made the API call:
Undefined index: ssl_key_password [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTest->validateCreate() ? CHttpTest->checkSslParameters() in C:\Development\zabbix\frontends\php\include\classes\api\services\CHttpTest.php:901] Undefined index: ssl_key_file [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTest->validateCreate() ? CHttpTest->checkSslParameters() in C:\Development\zabbix\frontends\php\include\classes\api\services\CHttpTest.php:908] Undefined index: delay [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:700] Undefined index: status [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:704] Undefined index: delay [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:700] Undefined index: status [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:704] Undefined index: delay [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:700] Undefined index: status [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:704
2. httpstep creation doesn't mind if property 'no' is actually required or not. But it should check if 'no' property is given.
- duplicates
-
ZBX-3783 Proper API validation
- Reopened