public async Task <IActionResult> Put(string id, [FromBody] Agent request) { try { var existingAgent = _agentManager.UpdateAgent(id, request); var result = await base.PutEntity(id, existingAgent); await _webhookPublisher.PublishAsync("Agents.AgentUpdated", existingAgent.Id.ToString(), existingAgent.Name).ConfigureAwait(false); return(result); } catch (Exception ex) { return(ex.GetActionResult()); } }