Deleting cases in version 5

We’re using Community Edition 5, and need advice writing a Java client program that executes Bonita REST APIs that delete cases for a given process. Does anyone have any experience doing this?