After send request for create host:
{
"auth" : "cc707461f861680b371a61cc48a4ae6a",
"params" : {
"inventory" : {
"notes" : "Host created via Zabbix API",
"type" : "Test host type"
},
"inventory_mode" : "1",
"interfaces" : {
"dns" : "",
"useip" : "1",
"ip" : "192.168.0.86",
"type" : "2",
"port" : "161",
"main" : "1"
},
"groups" : [
{
"groupid" : "6"
},
{
"groupid" : "7"
}
],
"host" : "Test AP via API 1"
},
"jsonrpc" : "2.0",
"id" : 0,
"method" : "host.create"
}
I received response:
{"jsonrpc":"2.0","result":{"hostids":["10100"]},"id":0}
but host was not created. Next same requests finished without any differences, I received same hostids in result.
If I remove from the query section "inventory", the host is created successfully.
- is duplicated by
-
ZBX-9093 Can't create host with inventory through API
-
- Closed
-