[ZBX-22842] Web Scenario status code blank into Zabbix API Created: 2023 May 24 Updated: 2023 May 25 Resolved: 2023 May 25 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A) |
Affects Version/s: | 6.0.17, 6.4.1, 6.4.2 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Pecas | Assignee: | Aleksandrs Petrovs-Gavrilovs |
Resolution: | Won't fix | Votes: | 0 |
Labels: | api | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Good morning, To access the API area that interests me I used Zabbix 6.2 and 6.4 and the official documentation, https://www.zabbix.com/documentation...ttptest/object, and as the API method the " httptest.get". The CURL command used is Code: curl -X POST -k -H 'Content-Type: application/json-rpc' -i 'https://zabbix.mydomain.com/zabbix/api_jsonrpc.php' --data '\{ "jsonrpc": "2.0", "method": "httptest.get", "params": { "selectSteps": "extend", "httptestids": "1", "selectHttpTests": "extend" },"auth":"<token my user>", "id": 1 }' Scrolling in the returned json, the key "status_code" is unfortunately empty while on the documentation it is indicated that if the site is online it should be "200". Can someone tell me how to fix it and if it was a bug how to report it? Thank you! |
Comments |
Comment by Edgar Akhmetshin [ 2023 May 25 ] |
https://www.zabbix.com/documentation/current/en/manual/api/reference/httptest/object
'httptest.get' returns configuration, not latest data. If required status code is not set in the configuration, it will return nothing. Works as expected. Please be advised that this section of the tracker is for bug reports only. The case you have submitted can not be qualified as one, so please reach out to [email protected] for commercial support (https://zabbix.com/support) or consultancy services. Alternatively, you can also use our IRC channel or community forum (https://www.zabbix.com/forum) for assistance. With that said, we are closing this ticket. Thank you for understanding. |