public async Task <IActionResult> LoginAsync([FromBody] dynamic parameters) { ZabbixResponse response = await _zabbixService.GetZabbixResponseAsync("user.login", parameters); ZabbixSettings.Token = response?.result; return(Ok(response.result)); }
public async Task <IActionResult> CreateHost([FromBody] dynamic parameters) { //ZabbixResponse templateResponse = await _zabbixService.GetZabbixResponseAsync("template.get", JsonConvert.SerializeObject(new { output = "extend" })); //ZabbixResponse response = await _zabbixService.GetZabbixResponseAsync("usermacro.get", JsonConvert.SerializeObject(new { output = "extend" })); ZabbixResponse response = await _zabbixService.GetZabbixResponseAsync("host.create", parameters); return(Ok(response.result)); }
public async Task <IActionResult> LogoutAsync() { ZabbixResponse response = await _zabbixService.GetZabbixResponseAsync("user.logout", null); if (response.error == null) { ZabbixSettings.Token = string.Empty; ZabbixSettings.Url = string.Empty; } return(Ok(response.result)); }
public async Task <IActionResult> GetApplication([FromBody] dynamic parameters) { ZabbixResponse response = await _zabbixService.GetZabbixResponseAsync("application.get", parameters); return(Ok(response.result)); }
public async Task <IActionResult> DeleteItem([FromBody] dynamic parameters) { ZabbixResponse response = await _zabbixService.GetZabbixResponseAsync("item.delete", parameters); return(Ok(response.result)); }
public async Task <IActionResult> UpdateHost([FromBody] dynamic parameters) { ZabbixResponse response = await _zabbixService.GetZabbixResponseAsync("host.update", parameters); return(Ok(response.result)); }
public async Task <IActionResult> CreateHostInterface(dynamic parameters) { ZabbixResponse response = await _zabbixService.GetZabbixResponseAsync("hostinterface.create", parameters); return(Ok(response.result)); }