-
New Feature Request
-
Resolution: Unresolved
-
Trivial
-
None
-
None
-
None
At the moment, it's not "simple" to create a map using the API when you need to create numerous hosts . The API would be much nicer to use if I could just specify an array of objects of "type", being an elementtype;
i.e if I wanted to create a map with hostid "1001","1002", the API should allow me to specify these hostid's as an array. Because the API already asks for elementtype, maybe it could be;
"method": "map.create", "params": { "name": "{{Name}}", "width": 1920, "height": 1080, "elements": [ { "host": { "hostid": ["1001","1002"], "iconid_off": "151" }, "hostgroup": { "groupid": ["101"], "areatype": 0, "elementsubtype": 1, }
e.t.c
Basically I just want to be able to loop through an output for ids, create an array and then tell zabbix to create that array of hosts. I don't see a need to individually specify iconid in this use case.