N
N
Nikolay Baranenko2017-12-15 09:52:51
Zabbix
Nikolay Baranenko, 2017-12-15 09:52:51

How to make a query so that only exact matches are returned?

Hello.
I make such a request to Zabbix API

zabbix_get=\
    {
        "jsonrpc": "2.0",
        "method": "item.get",
        "params": {
            "output": "extend",
            "host": "server01",
            "search": {
                "description": "Имя ФС: /data"
            },
            "sortfield": "name"
        },
        "auth": authToken.get("result"),
        "id": authToken.get("id")
    }

this returns itemsid for which the search value is an occurrence e.g.
'description': 'FS name: /data1'
what should appear in the API Request so that only exact matches are returned as a result?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2017-12-18
@drno-reg

Hello.
In an adjacent answer to your question, I touched on this topic.
For exact values, filter should be used instead of search .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question