该方法用于获取 Zabbix API 版本。

    参数

    此方法可用于未经身份验证的用户,必须在发送 JSON-RPC 请求中不加auth参数的情况下调用。

    该方法接受一个空的数组。

    返回值

    (string) 返回 Zabbix API 的版本。

    从 Zabbix 2.0.4 版本开始,API 的版本与 Zabbix 的版本相匹配。

    获取 API 版本

    请求:

    响应:

    来源

    CAPIInfo::version() in frontends/php/include/classes/api/services/CAPIInfo.php.

    Description

    This method allows to retrieve the version of the Zabbix API.

    The method accepts an empty array.

    Return values

    (string) Returns the version of the Zabbix API.

    Starting from Zabbix 2.0.4 the version of the API matches the version of Zabbix.

    Examples

    Retrieving the version of the API

    Retrieve the version of the Zabbix API.

    Request:

    CAPIInfo::version() in frontends/php/include/classes/api/services/CAPIInfo.php.