Accessing the API

zbx.api

Access to zabbix api as described here: https://www.zabbix.com/documentation/2.2/manual/api

class zbx.api.Api(user, password, url, auth_token=None)[source]

Main api object

authenticate(reset=False)[source]

Authenticates to the api.

request(method, params=None, auth_token=None)[source]

Handle a request to the api.

It will authenticate automatically if auth_token was not provided

zbx.api.cast(data)[source]

Ensure that int are int etc...

zbx.api.authenticate = <bound method Api.authenticate of <zbx.api.Api object at 0x3924c90>>

authenticate with the global api instance

zbx.api.request = <bound method Api.request of <zbx.api.Api object at 0x3924c90>>

request with the global api instance

zbx.api.configure(**attrs)[source]

Configure the global api instance.