Rest api fix