# How to cancel a running workflow job on Ansible Tower?

**URL:** <https://forum.ansible.com/t/how-to-cancel-a-running-workflow-job-on-ansible-tower/26336>\
**Category:** AWX Project\
**Created:** [December 20, 2017, 7:15am UTC](https://forum.ansible.com/t/how-to-cancel-a-running-workflow-job-on-ansible-tower/26336 "2017-12-20T07:15:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leima2046](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@leima2046](https://forum.ansible.com/u/leima2046)\
**Post date:** [December 20, 2017, 7:15am UTC](https://forum.ansible.com/t/how-to-cancel-a-running-workflow-job-on-ansible-tower/26336/1 "2017-12-20T07:15:14Z")

</div>

I tried to use the following API to cancel a running workflow job,

[https://tower\_IP/api/v2/workflow\_jobs/192/cancel/](https://tower_IP/api/v2/workflow_jobs/192/cancel/)

But got the below response,

{  
“detail”: “Method "POST" not allowed.”  
}

Also tried “DELETE”, got the same result. Using “GET”, got the status of “can\_cancel” field,

{  
“can\_cancel”: false or true  
}

So, what the correct way to cancel a running job?

Thanks.

---

<div class="post-metadata">

**Author:** ![AlanCoding](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/alancoding/32/301_2.png) [@AlanCoding](https://forum.ansible.com/u/AlanCoding)\
**Post date:** [December 20, 2017, 12:56pm UTC](https://forum.ansible.com/t/how-to-cancel-a-running-workflow-job-on-ansible-tower/26336/2 "2017-12-20T12:56:01Z")

</div>

This sounds right. You should be able to POST to the cancel endpoint with empty data. The error message you got is consistent with can\_cancel being false. I would expect can\_cancel to be false in the case that the workflow job had finished running.

If the workflow job is still running, it should cancel itself, propagate the cancel to any running jobs that it spawned, and no longer spawn any subsequent jobs.
