-
Incident report
-
Resolution: Duplicate
-
Trivial
-
None
-
2.2.4rc1, 2.3.1
Request:
httptest.create with httpstepid and without name
{ "hostid": 10107, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ] }
Response:
Item with key "web.test.in[E7,,bps]" already exists.
{ "jsonrpc": "2.0", "error": { "code": -32500, "message": "Application error.", "data": "Item with key \"web.test.in[E7,,bps]\" already exists.", "debug": [ { "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\managers\\CHttpTestManager.php", "line": 113, "function": "createStepsReal", "class": "CHttpTestManager", "type": "->", "args": [ { "hostid": 10108, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ], "templateid": "38", "httptestid": "39" }, [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ] ] }, { "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\managers\\CHttpTestManager.php", "line": 592, "function": "create", "class": "CHttpTestManager", "type": "->", "args": [ [ { "hostid": 10108, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ], "templateid": "38" } ], true ] }, { "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\managers\\CHttpTestManager.php", "line": 319, "function": "save", "class": "CHttpTestManager", "type": "->", "args": [ [ { "hostid": 10108, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ], "templateid": "38" } ] ] }, { "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\managers\\CHttpTestManager.php", "line": 59, "function": "inherit", "class": "CHttpTestManager", "type": "->", "args": [ [ { "hostid": 10107, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ], "httptestid": "38" } ] ] }, { "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\CHttpTest.php", "line": 294, "function": "persist", "class": "CHttpTestManager", "type": "->", "args": [ [ { "hostid": 10107, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ] } ] ] }, { "function": "create", "class": "CHttpTest", "type": "->", "args": [ { "hostid": 10107, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ] } ] }, { "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\rpc\\class.czbxrpc.php", "line": 120, "function": "call_user_func", "args": [ [ {}, "create" ], { "hostid": 10107, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ] } ] }, { "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\rpc\\class.czbxrpc.php", "line": 72, "function": "callAPI", "class": "czbxrpc", "type": "::", "args": [ "httptest.create", { "hostid": 10107, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ] } ] }, { "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\rpc\\class.cjsonrpc.php", "line": 71, "function": "call", "class": "czbxrpc", "type": "::", "args": [ "httptest.create", { "hostid": 10107, "name": "E7", "steps": [ { "httpstepid": 91, "url": "1", "status_codes": 200, "no": 1 } ] }, "c13d0098c517035dc324a2a5cfe75113" ] }, { "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api_jsonrpc.php", "line": 50, "function": "execute", "class": "CJSONrpc", "type": "->", "args": [] } ] }, "id": 28 }
In 2.2 - incorrect error message, in 2.3 undefined index in frontend
Moved from ZBX-8195
- duplicates
-
ZBX-3783 Proper API validation
- Reopened