Q: Deleting resources from two different tables in one RESTful API request In my RESTful API I need to have two operations:


*

*Remove player

*Remove player and his/her games
Although the first operation is obvious (DELETE request with URL /api/players/playerId), the second operation got me thinking. 
Second operation is tricky. You can remove the player and leave the game in the system but also there is an option that the player will delete all games he was in. As weird as it sounds, please believe me. I'm really curious how well designed API should handle such situation.
Is it a good practice to have a DELETE request with an bool option "removeGames". For example: 
DELETE /api/players/playerId?removeGames=1


A: I personally don't like this idea of passing bools to delete other domain objects.
I would do something along these lines:


*

*DELETE to /api/players/playerId

*DELETE to /api/players/playerId/games if you want to delete all of them

*DELETE to /api/players/playerId/games/gameId for a specific game


Of course you will have to make a decision what happens when you delete the player but keep the games, or you try to delete a game from a player that is already deleted
