I'm trying to synchronize a bunch of tasks into zabbix items via the api. The API is working fine for me, but I can't delete items through the API. ([ CItem::delete ] No permissions !). I can create them and list them, but I get "No Permissions" when I tried to delete them.
The API user I'm using can delete the item through the GUI.
I wanted to check here before I report a bug.
I'm using Zabbix 1.8.8.
I'm accessing the api throug a modified Zabbix.pm, which is just a thin wrapper around JSON::XS. Here's the debug output from a test script I wrote, which creates an item then tries to delete it:
Is there something I don't understand about permissions? Or should I report this as a bug.
Thanks,
Jeff
The API user I'm using can delete the item through the GUI.
I wanted to check here before I report a bug.
I'm using Zabbix 1.8.8.
I'm accessing the api throug a modified Zabbix.pm, which is just a thin wrapper around JSON::XS. Here's the debug output from a test script I wrote, which creates an item then tries to delete it:
Code:
request is: $VAR1 = {
'auth' => 'a2b281ef47aa34107ff81240ad98af95',
'params' => {
'key_' => 'pman.testitem.19503',
'applications' => [],
'hostid' => '10457',
'description' => 'Pman key for proc'
},
'jsonrpc' => '2.0',
'id' => 3,
'method' => 'item.create'
};
result is: $VAR1 = {
'jsonrpc' => '2.0',
'id' => 3,
'result' => {
'itemids' => [
'131947'
]
}
};
request is: $VAR1 = {
'auth' => 'a2b281ef47aa34107ff81240ad98af95',
'params' => {
'itemids' => [
'131947'
]
},
'jsonrpc' => '2.0',
'id' => 4,
'method' => 'item.delete'
};
result is: $VAR1 = {
'jsonrpc' => '2.0',
'error' => {
'data' => '[ CItem::delete ] No permissions !',
'message' => 'Application error.',
'code' => -32500
},
'id' => 4
};
Thanks,
Jeff
Comment