public async Task <IActionResult> Put(string id, [FromBody] AgentGroup request) { try { var existingAgentGroup = _agentGroupsManager.UpdateAgentGroup(id, request); var result = await base.PutEntity(id, existingAgentGroup); await _webhookPublisher.PublishAsync("AgentGroups.AgentGroupUpdated", existingAgentGroup.Id.ToString(), existingAgentGroup.Name).ConfigureAwait(false); return(result); } catch (Exception ex) { return(ex.GetActionResult()); } }