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

in 2.4 numeric values are unquoted in API response

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.4.7
    • Fix Version/s: None
    • Component/s: API (A)
    • Labels:

      Description

      Example response described in Zabbix 2.4 item.delete documentation ( https://www.zabbix.com/documentation/2.4/manual/api/reference/item/delete ):

      {
          "jsonrpc": "2.0",
          "result": {
              "itemids": [
                  "22982",
                  "22986"
              ]
          },
          "id": 1
      }
      

      Example request response from http client logging:

      13:56:27.811 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "POST /zabbix/api_jsonrpc.php HTTP/1.1[\r][\n]"
      13:56:27.812 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "Accept: text/plain, application/json, application/*+json, */*[\r][\n]"
      13:56:27.812 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "Content-Type: application/json;charset=UTF-8[\r][\n]"
      13:56:27.813 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "Content-Length: 109[\r][\n]"
      13:56:27.813 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "Host: host.domain.com[\r][\n]"
      13:56:27.813 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "Connection: Keep-Alive[\r][\n]"
      13:56:27.813 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "User-Agent: Apache-HttpClient/4.3.6 (java 1.5)[\r][\n]"
      13:56:27.814 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "Accept-Encoding: gzip,deflate[\r][\n]"
      13:56:27.814 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "[\r][\n]"
      13:56:27.814 DEBUG [main]  org.apache.http.wire - http-outgoing-37 >> "{"id":38,"method":"item.delete","params":["76182"],"jsonrpc":"2.0","auth":"c8dbb05c3e1426b416d125fef0a767ed"}"
      13:56:27.934 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "HTTP/1.1 200 OK[\r][\n]"
      13:56:27.935 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "Date: Mon, 21 Dec 2015 19:59:10 GMT[\r][\n]"
      13:56:27.935 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "Server: Apache/2.2.15 (Red Hat)[\r][\n]"
      13:56:27.935 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "X-Powered-By: PHP/5.3.3[\r][\n]"
      13:56:27.936 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "Access-Control-Allow-Origin: *[\r][\n]"
      13:56:27.936 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "Access-Control-Allow-Headers: Content-Type[\r][\n]"
      13:56:27.936 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "Access-Control-Allow-Methods: POST[\r][\n]"
      13:56:27.936 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "Access-Control-Max-Age: 1000[\r][\n]"
      13:56:27.937 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "Content-Length: 54[\r][\n]"
      13:56:27.937 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "Connection: close[\r][\n]"
      13:56:27.937 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "Content-Type: application/json[\r][\n]"
      13:56:27.937 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "[\r][\n]"
      13:56:27.938 DEBUG [main]  org.apache.http.wire - http-outgoing-37 << "{"jsonrpc":"2.0","result":{"itemids":[76182]},"id":38}"
      

      Expecting

      {"jsonrpc":"2.0","result":{"itemids":["76182"]},"id":38}

      but getting

      {"jsonrpc":"2.0","result":{"itemids":[76182]},"id":38}

        Attachments

          Activity

            People

            Assignee:
            zabbix.dev Zabbix Development Team
            Reporter:
            Metalpegleg@hotmail.com Kurt Paulson
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: