See for the official Zabbix site.


Jump to: navigation, search

Move API to Zabbix Server


Status: Initial draft, do not comment

Owner: Alexei


There are number of drawbacks of current implementation of Zabbix API:

  • code duplication (C, PHP)
  • poor performance especially for template related operations
  • lack of bulk operations and in-memory cache
  • API code is too tied to front-end code (no clear separation)
  • API is not available without Zabbix front-end

It's proposed to move API to Zabbix Server side.


Zabbix Server will be extended to accept API calls over HTTP protocol. PHP implementation of Zabbix API will be gradually (method-by-method) to server side.

Implementation phases

Phase I

Proof of concept which implements one or two API methods. Interface should have capabilities of routing implemented methods to the server.

Server will provide validation and audit log capabilities.

The specification will be finalized based on findings of Phase I.

Phase II

Template related methods moved to server side.

Phase III

All existing API methods translated to C code, no API (except wrapper) on the front-end.

Phase IV (out of scope of this development)

Zabbix front-end is completely detached from the database, it communicates via API only.


Zabbix Server should:

  • run new processes to accept and process API calls over TCP port 10053
  • perform strict validation of API requests
  • perform permission checks
  • use bulk operations whenever possible
  • write audit records

Zabbix Server will implement API according to available specification so that existing front-end code using API will stay intact.

Zabbix front-end will act as a wrapper for API calls. It will forward all API calls implemented on server side to Zabbix Server. In future, when 100% of API is supported by server, the front-end will talk directly to the server, probably, using reverse HTTP proxy such as Nginx for optional SSL connectivity.

API changes

All API methods will be split into two sets: supported by Zabbix Server and supported by older PHP implementation. All API methods supported by server will be forwarded to Zabbix Server and result will be returned to client.

There will be no validation for API methods forwarded to the server except 'jsonrpc' version name and 'method'.

Translation strings

  • New or updated string


  • What's new in Zabbix 3.0
  • Document that API is not fully available without running Zabbix Server

To be discussed

  • Translation of error messages
  • Audit logs
  • Shall we integrate API calls with caches available to Zabbix runtime? Perhaps it's better to keep it separate, at least for now.
  • Debug mode so that debug information is included into response


  • N/A