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:apiinfo:version

apiinfo.version

Description

string apiinfo.version(array)

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

Parameters

(array) The method accepts an empty array.

Return values

This method is available to unauthenticated users and should be called without the auth parameter in the JSON-RPC request. Starting from Zabbix 2.4 the method will return an error if the auth parameter is given.

(string) Returns the version of the Zabbix API.

Starting from Zabbix 2.0.4 the version of the API matches the version of Zabbix. In earlier 2.0 releases the method will always return 1.4.

Examples

Retrieving the version of the API

Retrieve the version of the Zabbix API.

Request:

{
    "jsonrpc": "2.0",
    "method": "apiinfo.version",
    "params": [],
    "id": 1,
    "auth": "16a46baf181ef9602e1687f3110abf8a"
}

Response:

{
    "jsonrpc": "2.0",
    "result": "2.0.5",
    "id": 1
}

Source

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