intellitrend / zabbixapi-php

Zabbix API client for PHP with session cache and SSL management
GNU Lesser General Public License v3.0
56 stars 10 forks source link

adding parameters #2

Closed coconutservices closed 4 years ago

coconutservices commented 5 years ago

Love the API, thanks so much. Found a snag, or im just not smart here.

how do i write a call for something where i want to limit it as the API calls out?

I cannot find good examples., say i want to query the current value of a specific item for a specific host? All the examples call a list of values that include all devices.

Thanks!

Jon

coconutservices commented 4 years ago

for example. how would i write this in the syntax required buy the API?

{ "jsonrpc": "2.0", "method": "item.get", "params": { "output": "extend", "hostids": "10084", "search": { "key_": "system" }, "sortfield": "name" }, "auth": "038e1d7b1735c6a5436ee9eae095879e", "id": 1 }

intellitrend-team commented 4 years ago

First of all sorry for the late reply and thank you for using the library.

We made a new commit for version 2.6 and added a new example that shows how to pass filter params. See examples/filter.php for details. There is also a new section Using filters and field selectors in the README.md.

Please let us know if this answers your questions.

intellitrend-team commented 4 years ago

Just a note: Version 2.7 is out. For consistency the classfile was renamed to ZabbixApi.php.

intellitrend-team commented 4 years ago

Closed