Rest Middleware application