public IHttpActionResult PostEndpointHealth(Guid id, [FromBody]HealthUpdate health, DateTimeOffset? clientCurrentTime = null) { if (_endpointRegistry.GetById(id) != null) RequestContext.Authorize(id); health.ValidateModel(); var clockDifference = GetServerToClientTimeDifference(clientCurrentTime); if (!_endpointRegistry.UpdateHealth(id, health.ToEndpointHealth(clockDifference))) return NotFound(); return Ok(); }