API endpoint for stopping the execution of tasks

It can be one line.