TL;DR: You have to get the executions' list and remove the appropriate ones using hte API.
Once we've managed to get the list of job executions, we can use the API to remove the relevant executions. The command is rather simple:
def deleteExecutions(server, port, api_