# URI Executing on SHELL not with Ansible YAML Task

**URL:** <https://forum.ansible.com/t/uri-executing-on-shell-not-with-ansible-yaml-task/37561>\
**Category:** Ansible Developer\
**Created:** [January 19, 2023, 3:44am UTC](https://forum.ansible.com/t/uri-executing-on-shell-not-with-ansible-yaml-task/37561 "2023-01-19T03:44:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ume90009](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ume90009/32/7189_2.png) [@ume90009](https://forum.ansible.com/u/ume90009)\
**Post date:** [January 19, 2023, 3:44am UTC](https://forum.ansible.com/t/uri-executing-on-shell-not-with-ansible-yaml-task/37561/1 "2023-01-19T03:44:00Z")

</div>

I need help with Converting Following URI to Ansible Task which is failing

curl -k1 -u admin:admin -X POST [https://10.10.2.3/wapi/v2.11.5/fileop?\_function=getgriddata](https://10.10.2.3/wapi/v2.11.5/fileop?_function=getgriddata) -H “Content-Type: application/json” -d {“type”: “BACKUP”}"

How to specify {“type”: “BACKUP”}

uri:  
url: “https://{{ nios\_provider.host }}/wapi/v2.11.5/fileop?\_function=getgriddata”  
method: POST  
user: “{{ infoblox\_username }}”  
password: “{{ infoblox\_password }}”  
force\_basic\_auth: yes  
headers:  
Content-Type: “application/json”  
body: ‘{“file\_name”:“{{ backup\_dest }}”}’  
body\_format: json  
status\_code: 200  
validate\_certs: no  
register: backup\_result

> **(attachments)**
>
> ![3.JPG](https://us1.discourse-cdn.com/ansible/original/2X/9/99cc74b6302c003461a48dfab0115409d71dd6fc.jpeg)
