hello,
i want use api to request all host, last triggers of each host and severity of each triggers,
i have five table in a mariadb database, i want to select last value of each name table,

i do this sql command to have host, name and severity,
i tried this sql command :
select host, e.name, e.severity from hosts left join items i on (i.hostid = hosts.hostid) inner join functions f on (f.itemid = i.itemid) inner join triggers t on (t.triggerid = f.triggerid) INNER JOIN events e ON (e.objectid = t.triggerid) group by hosts.hostid;
i want last host, name and severity, i want this result in sql :

i tried in sql but its verry difficult, is it possible to do with zabbix api ?
i want use api to request all host, last triggers of each host and severity of each triggers,
i have five table in a mariadb database, i want to select last value of each name table,

i do this sql command to have host, name and severity,
i tried this sql command :
select host, e.name, e.severity from hosts left join items i on (i.hostid = hosts.hostid) inner join functions f on (f.itemid = i.itemid) inner join triggers t on (t.triggerid = f.triggerid) INNER JOIN events e ON (e.objectid = t.triggerid) group by hosts.hostid;
i want last host, name and severity, i want this result in sql :

i tried in sql but its verry difficult, is it possible to do with zabbix api ?