- Leave project API - Member stats

Well, you allow to leave if you are owner if there are other admin users, a then, you remove the user membership but keep the project.owner attribute.

I think you can't leave the project been owner, you have to change the project owner to other user, and then, you can leave the project. 

The api can disallow you to leave the project until you change it, and the front can do this 2 steps for you.