[ZBXNEXT-4409] Allow setting case-sensitivity of "search" in API get method Created: 2018 Mar 06 Updated: 2018 Mar 06 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | API (A) |
Affects Version/s: | 4.0.0alpha4 |
Fix Version/s: | None |
Type: | Change Request | Priority: | Trivial |
Reporter: | dimir | Assignee: | Alexander Vladishev |
Resolution: | Unresolved | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Zabbix API get methods support "search" parameter. After noticing that it's case-insensitive (even on the database with correct collation) I went to see the documentation and could not find anything about case-sensitivity of search parameter. It would be great to be able to set case-sensitivity in request. Currently the search is case-insensitive: Request: { "auth": "bcf8d7b269174169777db7647c9e3e1c", "id": 2, "jsonrpc": "2.0", "method": "hostgroup.get", "params": { "search": { "name": "dev" }, "selectHosts": ["host"] } } Response: { "jsonrpc": "2.0", "result": [{ "groupid": "9", "name": "Templates/Network Devices", "internal": "0", "flags": "0", "hosts": [] }], "id": 2 } SQL generated from request: SELECT g.* FROM groups g WHERE ( ( UPPER(g.name) LIKE '%DEV%' ESCAPE '!' ) ) |
Comments |
Comment by dimir [ 2018 Mar 06 ] |
Derived from |
Comment by dimir [ 2018 Mar 06 ] |
Workaround if case-sensitive search is required: run through returned results and filter out non-matching entries. |