# Call AWX API with uri module

**URL:** <https://forum.ansible.com/t/call-awx-api-with-uri-module/29424>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [January 11, 2019, 1:36pm UTC](https://forum.ansible.com/t/call-awx-api-with-uri-module/29424 "2019-01-11T13:36:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkempster22uu](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mkempster22uu](https://forum.ansible.com/u/mkempster22uu)\
**Post date:** [January 11, 2019, 1:36pm UTC](https://forum.ansible.com/t/call-awx-api-with-uri-module/29424/1 "2019-01-11T13:36:43Z")

</div>

Is there anyway of sending a limit to the AWX API through the ansible URI module? I can successfully launch jobs without a limit using the below example. But no matter where I try put the limit (within body or out of it) it won’t pass it through.  
For info I don’t do much work with API’s so I’m not so good

- name: Launch USMS scan (Solaris)  
uri:  
url: [http://XXXXXX:80/api/v2/job\_templates/66/launch/](http://XXXXXX:80/api/v2/job_templates/66/launch/)  
method: POST  
user: svc1\_awx  
password: “XXXXXXXX”  
status\_code: 201

# body:

# limit: “{{ hostname }}”

# body\_format: json

when: os == “sol”

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [January 11, 2019, 1:50pm UTC](https://forum.ansible.com/t/call-awx-api-with-uri-module/29424/2 "2019-01-11T13:50:24Z")

</div>

The limit value in the job template definition needs to be set to allow prompt-on-launch… otherwise the launch endpoint will silently ignore it.

---

<div class="post-metadata">

**Author:** ![mkempster22uu](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mkempster22uu](https://forum.ansible.com/u/mkempster22uu)\
**Post date:** [January 11, 2019, 1:56pm UTC](https://forum.ansible.com/t/call-awx-api-with-uri-module/29424/3 "2019-01-11T13:56:03Z")

</div>

Ah great that solved the issue, Thanks!
