This is a small plugin to disable REST API completely and for all users, not just for anonymous.