See www.zabbix.com for the official Zabbix site.

Docs/specs/ZBXNEXT-1491

From Zabbix.org
Jump to: navigation, search

Property array support for API get method subselects

ZBXNEXT-1491

Status: v1.1

Owner: Jelisejev (talk)

Summary

All get method subselects must support requesting of specific object properties by passing an array of property names.

Specification

Details

API changes

  • When passing an array of property names to a subselect, only the requested fields must be returned.
  • This must not affect the inner API operations, for example, mapping elements. That is, when calling host.get with selectItems, items must be correctly added to hosts, even if the hostid property is not requested.
  • All subselects must return arrays of object, not hashes.

Documentation

The following documentation sections must be updated:

  • The API changelog;
  • Subselects that currently do not support arrays of properties.

Test cases

  • All subselects support arrays of property names as values.
  • Only the requested properties are returned.
  • Object mapping works correctly even if the reference fields are not requested.

ChangeLog

  • v1.1
    • Added a note about subselects returning hashes
  • v1.2
    • N/A