Delete all posts by a user on entire site with API?

Looks like there is an endpoint to batch delete all posts for a user.

It’s triggered by this button on the users page from the admin dashboard