API endpoint for stopping the execution of tasks