Hello
I need some help when using Zabbix API "host.delete"
I already checked the documentation:
I'm using host ID = 18925 and this would be script that deletes hosts:
I also tried this:
Getting this response:
It doesn't matter if I use a 'variable' or enter the value for the host id.
I have check several posts on this forum and also within Zabbix support, but I can't find a way to make it work.
Could you please shed some light?
I need some help when using Zabbix API "host.delete"
I already checked the documentation:
I'm using host ID = 18925 and this would be script that deletes hosts:
deleting = @{
body = @{
"jsonrpc"= "2.0"
"method"= "host.delete"
"params" = @{
18925}
auth = 1234566789
id =0
body = @{
"jsonrpc"= "2.0"
"method"= "host.delete"
"params" = @{
18925}
auth = 1234566789
id =0
deleting = @{
body = @{
"jsonrpc"= "2.0"
"method"= "host.delete"
"params" = @{
"hostid" = "18925"}
auth = 1234566789
id =0
body = @{
"jsonrpc"= "2.0"
"method"= "host.delete"
"params" = @{
"hostid" = "18925"}
auth = 1234566789
id =0
{"jsonrpc":"2.0","error":{"code":-32500,"message":"Application error.","data":"SQL statement execution has failed "DELETE
FROM screens_items WHERE resourceid=Array AND resourcetype='16'""},"id":3}
FROM screens_items WHERE resourceid=Array AND resourcetype='16'""},"id":3}
It doesn't matter if I use a 'variable' or enter the value for the host id.
I have check several posts on this forum and also within Zabbix support, but I can't find a way to make it work.
Could you please shed some light?
Comment