Reputation: 125
can someone provide an example how to work with Zabbix API from Delphi? Which Delphi component to use?
Thanks
Upvotes: 0
Views: 903
Reputation: 435
Basically, the whole Zabbix API is just a JSON-RPC API, accessible via POST calls on one single URL. Further details about API can be found here: https://www.zabbix.com/documentation/2.4/manual/api
As can be seen, the only thing you have to do is to make a POST to:
http://company.com/zabbix/api_jsonrpc.php HTTP/1.1
Content-Type: application/json-rpc
{"jsonrpc":"2.0","method":"apiinfo.version","id":1,"auth":null,"params":{}}
Now, it does not matter whether you use delphi or not, you only need a component that can build a HTTP request and parse HTTP respone. I found this question, that may be helpful for you, since it seems to handle HTTP POSTs in Delphi.
What’s the simplest way to call Http POST url using Delphi?
At this time, i don't know any existing Delphi library that would do the magic for you.
Upvotes: 2