Ad Widget

Collapse

Using API to retrieve items by their key value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ontani
    Junior Member
    • Mar 2011
    • 6

    #1

    Using API to retrieve items by their key value

    I want to use the API to retrieve all the items on a particulair host on which the key starts with "ifOutOctets". So I tried following API call:

    {"jsonrpc":"2.0","auth":"0d8a5a9b3be0a817ae0e89c80 9e1356b","id":"1","method":"item.get","params":"ou tput":"extend","host":"SW_ProfelFR_1","filter":{"k ey":"ifOutOctets"}}}
    But this returns all items for the SW_ProfelFR_1 host 82 instead of 26.

    What could be the issue here?
  • Ontani
    Junior Member
    • Mar 2011
    • 6

    #2
    Use search instead of filter and key_ instead of key

    Use search instead of filter and key_ instead of key

    {"jsonrpc":"2.0","auth":"0d8a5a9b3be0a817ae0e89 c80 9e1356b","id":"1","method":"item.get","params":"ou tput":"extend","host":"SW_ProfelFR_1","search":{"k ey_":"ifOutOctets"}}}

    Comment

    Working...