Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-13577

Zabbix API "search" parameter case-sensitivity of get method is not documented

XMLWordPrintable

    • Icon: Documentation task Documentation task
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 4.0 (plan)
    • 4.0.0alpha4
    • Documentation (D)
    • None
    • Sprint 29
    • 0

      Zabbix API get methods support "search" parameter

      https://www.zabbix.com/documentation/4.0/manual/api/reference_commentary#common_get_method_parameters

      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 patterns.

      Request:

      {
      	"auth": "bcf8d7b269174169777db7647c9e3e1c",
      	"id": 2,
      	"jsonrpc": "2.0",
      	"method": "hostgroup.get",
      	"params": {
      		"search": {
      			"name": "dev"
      		},
      		"selectHosts": ["host"]
      	}
      }
      

      generates the following SQL:

      SELECT g.* FROM groups g WHERE ( (  UPPER(g.name)  LIKE '%DEV%' ESCAPE '!' ) )
      

            martins-v Martins Valkovskis
            dimir dimir
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: