Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-4409

Allow setting case-sensitivity of "search" in API get method

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 4.0.0alpha4
    • API (A)
    • None

      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 '!' ) )
      

            sasha Alexander Vladishev
            dimir dimir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: