Filtering and searching

Most of the time, you can do filtering/searching via the s.{columnName}={value} approach above which is simpler and more tolerant. However, there is the facility to specify searching in a JSON format using the json_filter URL parameter. The contents of this is converted to a perl hash format, which is expected to be in SQL:Abstract format.

For instance, to search for all objects where id is not equal to 1, you would have:

....?json_filter={"id":{"!=":1}}

And to search for all objects who’s name contains ‘collector’ or FQDN contains ‘der’, you would have:

....?json_filter={"-or":[{"name":{"-like":"%25collector%25C"}},{"ip":{"-like":"%25der%25"}}]}

T the % SQL search regexp is url encoded to be %25.

Note

As this option is more low level, you may cause errors when invoking the API. If there are errors with the search, you will get a message of Error executing search with detail giving the full reason.

Only the current table search column comparisons are supported at the moment. All column names are prefixed with me., which means only a search on the current table is possible.

["Opsview On-premises"] ["API", "Technical Reference"]

Was this topic helpful?