[ZBX-10880] JSON-RPC batch aren't working anymore in 3.0 Created: 2016 Jun 06 Updated: 2017 May 30 Resolved: 2016 Jul 18 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A) |
Affects Version/s: | 3.0.3 |
Fix Version/s: | 3.0.4rc1, 3.2.0alpha1 |
Type: | Incident report | Priority: | Minor |
Reporter: | Julien Roncaglia | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | json-rpc, regression | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
JSON-RPC support request batching (6. Batch in the specification) and we were using it with Zabbix 2 (2.0.3 exactly) without problems. Since we upgrated to 3.0.3 zabbix returns JSON-rpc version is not specified when we send them. I didn't see any notes about this behavior in Zabbix documentation, and batching doesn't seem optional in the JSON-RPC specification, did I miss something ? Request: [ { "jsonrpc":"2.0", "method":"trigger.get", "auth":"...", "params": { "output":"extend", "expandData":true, "expandDescription":true, "preservekeys":true, "filter":{"triggerid":[]}}, "id":0 } ] Response: { "jsonrpc": "2.0", "error": { "code": -32600, "message": "Invalid Request.", "data": "JSON-rpc version is not specified." }, "id": null } |
Comments |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 06 ] |
option filter has extra char "filter":{"triggerid":[] } }, |
Comment by Julien Roncaglia [ 2016 Jun 06 ] |
Yes that's me trying and failing to do manual indenting for the JIRA . Noticed it after posting but cant' seem to be able to edit my post. My test to confirm that batch didn't work is simply to take any single request and add brackets around. I changed our internal tool that query zabbix to disable batching and it's working correctly (Same messages, just not batched anymore). |
Comment by Julien Roncaglia [ 2016 Jun 06 ] |
Also "option filter has extra char" doesn't really have an extra char, it's just not correctly indented. Correct indentation, not done by hand : [ { "jsonrpc": "2.0", "method": "trigger.get", "auth": "...", "params": { "output": "extend", "expandData": true, "expandDescription": true, "preservekeys": true, "filter": { "triggerid": [] } }, "id": 0 } ] (But the exact query doesn't seem to matter anyway, no batch works whatever the query) |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 07 ] |
This is a regression from |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 07 ] |
(1) No translation string changes. gunarspujats CLOSED |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 07 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-10880 |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 09 ] |
(2) Create test for execute() method of class CJsonRpc gunarspujats CLOSED |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 09 ] |
(3) Incorrect response error of execute() method. gunarspujats CLOSED |
Comment by Gunars Pujats (Inactive) [ 2016 Jun 20 ] |
(4) Coding style include/classes/json/CJson.php tests/unit/include/classes/core/CJsonRpcTest.php vitalijs.cemeris RESOLVED in r60701, r60707, r60708, r60718, r60719, r60720 gunarspujats include/classes/core/CJsonRpc.php vitalijs.cemeris RESOLVED in r60752 gunarspujats CLOSED |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 27 ] |
(5) error message for '5', '0' should be same. RESOLVED in r60748, r60775 gunarspujats CLOSED |
Comment by Gunars Pujats (Inactive) [ 2016 Jun 28 ] |
Tested |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 28 ] |
Fixed in:
|
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 29 ] |
(6) API documentation:
sasha CLOSED |
Comment by richlv [ 2016 Sep 20 ] |
this broke the api - see |