[ZBX-12727] Response of the script.get method is different Created: 2017 Sep 14  Updated: 2018 Oct 09  Resolved: 2018 Feb 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 3.0.10, 3.2.7
Fix Version/s: 3.0.12rc1, 3.2.9rc1, 3.4.3rc1, 4.0.0alpha1, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Hayato Watanabe Assignee: Alexander Vladishev
Resolution: Fixed Votes: 0
Labels: script.get
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team B
Sprint: Sprint 16, Sprint 17
Story Points: 0.5

 Description   

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.



 Comments   
Comment by Alexander Vladishev [ 2017 Sep 18 ]

Fixed in dev branch svn://svn.zabbix.com/branches/dev/ZBX-12727

Comment by Alexander Vladishev [ 2017 Sep 18 ]

(1) No translation strings changed

iivs CLOSED

Comment by Alexander Vladishev [ 2017 Sep 25 ]

Fixed in:

  • 3.0.12rc1 r72891
  • 3.2.9rc1 r72892
  • 3.4.3rc1 r72903
  • 4.0.0alpha1 (trunk) r72904
Comment by Ivo Kurzemnieks [ 2018 Feb 07 ]

(3) [D] This fix is not mentioned in API changes.

sasha WON'T FIX

Generated at Fri Mar 29 10:05:41 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.