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

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

    Details

    • Type: Change Request
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.0.0alpha4
    • Fix Version/s: None
    • Component/s: API (A)
    • Labels:
      None

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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: