"""
Shows a list of all current issues (AKA tripped triggers)
"""
#for argument support
import sys
from pyzabbix import ZabbixAPI
# The hostname at which the Zabbix web interface is available
ZABBIX_SERVER = 'http://localhost/'
zapi = ZabbixAPI(ZABBIX_SERVER)
# Login to the Zabbix API
zapi.login('Admin', 'zabbix')
#zapi.do_request('host.get', { 'filter': {'host': sys.argv[1]}, 'output': 'hostid'})
res1 = zapi.do_request('host.get', { 'filter': {'host': sys.argv[1]}, 'output': 'hostid'})
res2 = str(res1.get(u'result')).split('\'')
print res2[3]
To update visiable name I need additional line:
zabbix_hostid = res2[3]
zapi.do_request('host.update', {'hostid': zabbix_hostid,'name': 'Visiable name'})