Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-11254

incorrect error message "JSON-rpc version is not specified"

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.0.3
    • API (A)

      send json like this to the api :

      {"jsonrpc":"2.0","method":"host.create","params":{"host":"Linux server","interfaces":[{"type":1,"main":1,"useip":1,"ip":"192.168.3.1","dns":"","port":"10050"}],"groups": [{"groupid":"50"}],},"auth":"4b8dce2153bbba6e5e9988a2a4d729ac","id":1}
      

      that errors out :

      {"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid Request.","data":"JSON-rpc version is not specified."},"id":null}
      

      that's wrong - jsonrpc parameter is specified, and the real problem is the extra comma in "params": ...[{"groupid":"50"}],}

            Unassigned Unassigned
            richlv richlv
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: