apiinfo.version

Description

string apiinfo.version(array)

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

Parameters

This method is available to unauthenticated users and must be called without the auth parameter in the JSON-RPC request.

(array) 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:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "apiinfo.version",
  4. "params": [],
  5. "id": 1
  6. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": "4.0.0",
  4. "id": 1
  5. }

Source

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