简体   繁体   中英

Working with Zabbix API from Delphi

can someone provide an example how to work with Zabbix API from Delphi? Which Delphi component to use?

Thanks

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM