Zabbix Documentation 2.0

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

manual:appendix:api:changes_1.8_-_2.0

Zabbix API changes from 1.8 to 2.0

List of changes for all *.get methods is complete.
List of changes for other methods is still not complete.

Generic changes

  • API access property has been removed. No reasons given.
  • For all *.get methods a new searchByAny parameter has been added.

Action

Actions API changed significantly:

  • Fields were removed from “operations” array: object, objectid, shortdata, longdata, default_msg.
  • shortdata, longdata, default_msg were moved to array opmessage. shortdata and longdata were renamed to subject and message.
  • For different operation types added different arrays of parameters:
    • for “Send message” operation added arrays opmessage, opmessage_usr, opmessage_grp
    • for “Execute remote command” operation added arrays opcommand_hst, opcommand_grp
    • for “Add host group” and “Remove host group” added array opgroup
    • for “Link to template” and “Unlink from template” added array optemplate
  • Added new parameters for action.get method: usrgrpids, scriptids
  • Parameter names for method action.get have been changed from → to: select_conditions → selectConditions, select_operations → selectOperations

Alert

Parameter names for method alert.get have been changed from → to: select_mediatypes → selectMediatypes, select_users → selectUsers, select_hosts → selectHosts.

Apiinfo

API version has been increased. Method apiinfo.version now returns 1.4 as a result.

Application

Parameter names for method application.get have been changed from → to: select_hosts → selectHosts, select_items → selectItems.

Dcheck

Added new parameters for dcheck.get method: dserviceids, selectHosts.

Dhost

No specific changes for dhost.get method.

Discoveryrule

New API class for low level discovery rules has been added.

Drule

No specific changes for drule.get method.
Added create/update methods.

Dservice

No specific changes for dservice.get method.

Event

Methods event.create and event.delete not supported anymore and have been removed.
Parameter names for method event.get have been changed from → to: select_hosts → selectHosts, select_items → selectItems, select_triggers → selectTriggers
Parameter hide_unknown replaced by showUnknown
Added new parameters for extending output: select_alerts, select_acknowledges, groupCount
Added new parameters for optional filtering: filter, search, searchByAny, startSearch, excludeSearch, searchWildcardsEnabled.

Graph

Added new parameters for graph.get method: discoveryids, selectDiscoveryRule.
Parameter names for method graph.get have been changed from → to: select_groups → selectGroups, select_templates → selectTemplates, select_hosts → selectHosts, select_items → selectItems, select_graph_items → selectGraphItems.

Graphitem

Parameter name for method graphitem.get has been changed from → to: select_graphs→ selectGraphs.

Graphprototype

New API class for graph prototypes has been added.

History

No specific changes for history.get method.

Host

Each host can now have multiple host interfaces instead of just one.
Added new parameters for host.get method: interfaceids, applicationids, httptestids, with_simple_graph_items, with_applications, withInventory, selectDiscoveries, selectScreens, selectInterfaces
Parameter names for method host.get have been changed from → to: select_groups → selectGroups, select_items → selectItems, select_triggers→ selectTriggers, select_graphs → selectGraphs, select_dhosts → selectDHosts, select_dservices → selectDServices, select_applications → selectApplications, select_macros → selectMacros, select_profile → selectInventory.
host.get parameter 'selectInventory' now supports not only boolean values, but also an array of fields that needs to be fetched (similar to 'output' option).
host.create, host.update and host.massUpdate parameter 'profile' and 'extendedProfile' are replaced by 'inventory'.
host.create has new parameter 'inventory_mode' which specifies if host inventory is: -1 - disabled, 0 - manual or 1 - automatic, for the host being created. host.massupdate with macros now removes all existing macros from hosts and create new ones instead of trying to update macros based on hostmacroid. To update host macros host.update can be used.

Hostinterface

New API class for host interfaces has been added.

Hostgroup

Added new parameters for hostgroup.get method: with_hosts_and_templates, with_simple_graph_items, with_applications
Parameter names for method hostgroup.get have been changed from → to: select_hosts → selectHosts, select_templates → selectTemplates

Item

Added new parameters for item.get method: interfaceids, discoveryids, selectInterfaces, selectDiscoveryRule, selectItemDiscovery.
Parameter names for method item.get have been changed from → to: select_hosts → selectHosts, select_triggers→ selectTriggers, select_graphs → selectGraphs, select_applications → selectApplications.

An item field “description” has been renamed to “name”.
New item field “description” added. It can be used for multi-line item description.
New item field “inventory_link” added.

Itemprototype

New API class for item prototypes has been added.

Iconmap

New API class for icon maps has been added.

Image

No changes for image.get method.

Maintenance

Parameter names for method maintenance.get have been changed from → to: select_groups → selectGroups, select_hosts → selectHosts

Map

Map object gets 16 additional fields

  • 3 to control map display during configuration:
    • grid_size - integer, optional, default 50
    • grid_show - integer, optional, default 1
    • grid_align - integer, optional, default 1
  • 11 to control element labels
    • label_format - integer, optional, default 0
    • label_type_hostgroup - integer, optional, default 2
    • label_type_host - integer, optional, default 2
    • label_type_trigger - integer, optional, default 2
    • label_type_map - integer, optional, default 2
    • label_type_image - integer, optional, default 2
    • label_string_hostgroup - string, optional, default “”
    • label_string_host - string, optional, default “”
    • label_string_trigger - string, optional, default “”
    • label_string_map - string, optional, default “”
    • label_string_image - string, optional, default “”
  • 1 to represent icon map linkage
    • iconmapid - id, optional, default NULL
  • 1 to control if macros are expanded on map configuration screen
    • expand_macros - int, optional, default 0

Map element gets 6 additional fields

  • 5 to control areas
    • elementsubtype integer, optional, default 0
    • areatype integer, optional, default 0
    • width integer, optional, default 200
    • height integer optional, default 200
    • viewtype integer, optional, default 0
  • 1 to enable icon mapping for element
    • use_iconmap - integer, optional, default 1

Added new parameters for map.get method: selectIconMap, expandUrls.
Parameter names for method map.get have been changed from → to: select_links → selectLinks, select_selements → selectSelements.

map.addElements has been renamed to map.createSelements, map.updateElements to map.updateSelements and map.deleteElements to map.deleteSelements.

Mapelement

New API class for map elements has been added.

Mediatype

Added new medaitype field “status”.

Parameter names for method mediatype.get have been changed from → to: select_users → selectUsers, select_medias → selectMedias.

Proxy

Added new parameters for proxy.get method: selectInterfaces.
Parameter names for method proxy.get have been changed from → to: select_hosts → selectHosts.

Screen

Added new parameters for screen.get method: groupCount.
Parameter names for method screen.get have been changed from → to: select_screenitems → selectScreenItems.

Screenitem

New API class for screen items has been added.

Script

Added new script fields: description, question, type, execute_on.

Added new parameters for script.get method: usrgrpids.
Parameter names for method script.get have been changed from → to: select_groups → selectGroups, select_hosts → selectHosts.

Template

Added new parameters for template.get method: selectDiscoveries, selectScreens.
Parameter names for method template.get have been changed from → to: select_groups → selectGroups, select_hosts → selectHosts, select_templates → selectTemplates, selectParentTemplates → selectParentTemplates, select_items → selectItems, select_triggers → selectTriggers, select_graphs → selectGraphs, select_applications → selectApplications, select_macros → selectMacros.

Trigger

Added new value “hostname” as sortfield.
Added new parameters for trigger.get method: discoveryids, selectDiscoveryRule.
Parameter names for method trigger.get have been changed from → to: select_groups → selectGroups, select_hosts → selectHosts, select_items → selectItems, select_functions → selectFunctions, select_dependencies → selectDependencies.

Triggerprototype

New API class for trigger prototypes has been added.

User

Method user.addMedia if it's successful now returns array of created user media IDs. Previously it returned array of updated User IDs.
Method user.deleteMedia now should receive an array of user media IDs which should be deleted. Previously it should receive media objects which should be deleted.
Added new parameters for user.get method: selectMedias.
Parameter names for method user.get have been changed from → to: select_usrgrps → selectUsrgrps, select_mediatypes → selectMediatypes, get_access → getAccess.
Method user.get with the option “output”: “extend” now will not show user password hashes, i.e. they are removed from output.

Usergroup

From UserGroup object removed field api_access.
Removed “with_api_access” parameter for usergroup.get method.
Parameter names for method usergroup.get have been changed from → to: select_users → selectUsers.

Usermacro

Method usermacro.updateglobal now uses macro IDs instead of macro names.
Method usermacro.massadd renamed to usermacro.create and will now accept an array of macros.
Method usermacro.massupdate renamed to usermacro.update. It will now accept an array of macros, and update the data via IDs instead of macro names.
Method usermacro.deletehostmacro renamed to usermacro.delete.
Removed the usermacro.massRemove method.

Parameter names for method usermacro.get have been changed from → to: select_groups → selectGroups, select_hosts → selectHosts, select_templates → selectTemplates.

Usermedia

Added new class Usermedia with a method get.

Webcheck

New API class for web checks has been added.