-
Problem report
-
Resolution: Won't fix
-
Trivial
-
None
-
4.4.1
-
CentOS 7, PostgreSQL DB, Apache httpd Frontend
Steps to reproduce:
- Install Zabbix 4.4.1 using packages.
- Create a host and application (via API or UI).
- Post the following request:
{ "jsonrpc": "2.0", "method": "httptest.create", "params": { "steps": [ { "name": "Get the page and expect 200 and body html tag", "url": "http://example/page", "status_codes": "200", "required": "<body>", "follow_redirects": "1", "retrieve_mode": "1", "timeout": "15s", "posts": "", "headers": [], "variables": [], "query_fields": [], "no": 1 }, { "name": "Post something to my backend and expect a success response", "url": "http://example/backend/create", "posts": "{\"username\":\"admin\"}", "status_codes": "201", "required": "\"success\": true", "headers": [ { "name": "Content-Type", "value": "application/json" } ], "follow_redirects": "1", "retrieve_mode": "1", "timeout": "15s", "variables": [], "query_fields": [], "no": 2 } ], "name": "Example Scenario", "agent": "Zabbix", "authentication": "0", "delay": "1m", "retries": "1", "status": "0", "verify_host": "0", "verify_peer": "0", "headers": [], "variables": [], "http_user": "", "http_password": "", "http_proxy": "", "ssl_cert_file": "", "ssl_key_file": "", "ssl_key_password": "", "applicationid": "<applicationid>", "hostid": "<hostid>" }, "id": 11, "auth": "<authtoken>" }
Result:
Response from host:
{ "jsonrpc": "2.0", "error": { "code": -32602, "message": "Invalid params.", "data": "Incorrect value for field \"posts\": should be empty." }, "id": 11 }
Expected:
HTTP Test is created with the two steps (one with post data and one without)
Response from host:
{ "jsonrpc": "2.0", "result": { "httptestids": [ "<some new id>" ] }, "id": 11 }