[ZBX-6486] host.create api perl Created: 2013 Apr 12  Updated: 2017 May 30  Resolved: 2013 Apr 12

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 2.0.5
Fix Version/s: None

Type: Incident report Priority: Critical
Reporter: Bogdan Lobachevsky Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: api
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ubuntu 12.04


Issue Links:
Duplicate
duplicates ZBX-6018 API host.update bug when using double... Closed

 Description   

trying to create host by api
$json = {
jsonrpc => '2.0',
method => 'host.create',
params => {
host => 'test_from_api',
output => 'extend',
interfaces =>

{ dns => '', hostid => '25', ip => '127.0.0.1', main => '1', port => '10050', type => '1', useip => '1', }

,
groups =>

{ groupid => '2', }

,
},
auth => "$authID",
id => '21',
};
all ok.. but if change groupid to 11 or 12 or 23 or 34 etc.. (2 digits)
have this answer
"code":-32500,"message":"Application error.","data":"No permissions to referred object or it does not exist!"



 Comments   
Comment by richlv [ 2013 Apr 12 ]

values must be properly quoted in the actual json that arrives at the api. duplicate of ZBX-6018 in a way...

Generated at Tue Apr 07 07:22:27 EEST 2026 using Jira 10.3.18#10030018-sha1:5642e4ad348b6c2a83ebdba689d04763a2393cab.