Attempting to do a template "unlink and clear" via the API fails. Performing the operation manually (via the Web UI) works as expected.
Request:
{
"method": "host.massremove",
"params": {
"hostids": [
"10141"
],
"templateids_clear":
},
"auth": "8f0b53cfa9d56d8e65533d60d763bcef",
"id": 73983,
"jsonrpc": "2.0"
}
Response:
{ "code": -32500, "message": "Application error.", "data": "SQL statement execution has failed \"DELETE FROM hosts_templates WHERE templateid=Array AND hostid='10141'\"" }- duplicates
-
ZBX-3783 Proper API validation
- Reopened