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

Response of the script.get method is different

XMLWordPrintable

    • Sprint 16, Sprint 17
    • 0.5

      Hi guys.

      I use script.get of API method then, attend user group permissions is nothing.
      When editable parameter is specified, it behaves differently from the default value.
      Documentation is "default: false". But, source code is null only.

      Documentation:
      https://www.zabbix.com/documentation/3.0/manual/api/reference_commentary

      Response:

      editable is false
      [root@localhost ~]# curl -s -d '{ "jsonrpc": "2.0", "method": "script.get", "params": { "editable":false ,"output": "extend" }, "auth": "1a2538e686f8c69283b41d6ed18493c3", "id": 1}' -H "Content-Type: application/json-rpc" http://localhost/zabbix/api_jsonrpc.php | jq .
      {
        "jsonrpc": "2.0",
        "result": [],
        "id": 1
      }
      
      editable nothing
      [root@localhost ~]# curl -s -d '{ "jsonrpc": "2.0", "method": "script.get", "params": { "output": "extend" }, "auth": "1a2538e686f8c69283b41d6ed18493c3", "id": 1}' -H "Content-Type: application/json-rpc" http://localhost/zabbix/api_jsonrpc.php | jq .
      {
        "jsonrpc": "2.0",
        "result": [
          {
            "scriptid": "1",
            "name": "Ping",
            "command": "/bin/ping -c 3 {HOST.CONN} 2>&1",
            "host_access": "2",
            "usrgrpid": "0",
            "groupid": "0",
            "description": "",
            "confirmation": "",
            "type": "0",
            "execute_on": "1"
          },
          {
            "scriptid": "2",
            "name": "Traceroute",
            "command": "/bin/traceroute {HOST.CONN} 2>&1",
            "host_access": "2",
            "usrgrpid": "0",
            "groupid": "0",
            "description": "",
            "confirmation": "",
            "type": "0",
            "execute_on": "1"
          }
        ],
        "id": 1
      }
      

      Thank you.

            sasha Alexander Vladishev
            hayato.watanabe Hayato Watanabe
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: