public IActionResult DeleteInstance(string instanceId)
        {
            try
            {
                var instance = _instanceService.GetInstance(instanceId);
                if (instance == null)
                {
                    Response.StatusCode = 404;
                    return(Json(new ErrorMessage {
                        Message = "No instance found", Traceback = ""
                    }));
                }

                _instanceService.DeleteInstance(instance);
                return(Json(true));
            }
            catch (Exception e)
            {
                Response.StatusCode = 500;
                return(Json(ErrorMessage.Map(e)));
            }
        }
 public void Delete(Guid instanceGuid)
 {
     _instanceService.DeleteInstance(instanceGuid);
 }