# Help needed on URI Module POST

**URL:** <https://forum.ansible.com/t/help-needed-on-uri-module-post/37467>\
**Category:** Ansible Project\
**Created:** [December 14, 2022, 8:57pm UTC](https://forum.ansible.com/t/help-needed-on-uri-module-post/37467 "2022-12-14T20:57:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammed\_Reehan](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mohammed\_Reehan](https://forum.ansible.com/u/Mohammed_Reehan)\
**Post date:** [December 14, 2022, 8:57pm UTC](https://forum.ansible.com/t/help-needed-on-uri-module-post/37467/1 "2022-12-14T20:57:27Z")

</div>

Hi Ansible Experts,

I am trying to using Ansible URI as below to post the content where my input is a variable of type Array in the body.  
i am trying to pass the input as Array into the body under Contentdetials which is an array. however it is ending up reading as string.  
any idea how can i achieve this? i tried with With\_items to loop the input but it is not working.  
I have also pasted my JSON (JS body below) and input as an array.

Looking forward to hearing from you and help on this

Regards  
Reehan

ansible.builtin.uri:  
url: “[https://vrclm.dev.local/lcm/cms/api/vl/contents/pipelines](https://vrclm.dev.local/lcm/cms/api/vl/contents/pipelines)”  
method: POST  
headers:  
Cookie: “JSESSIONID={{ vrlcm api auth token }}”  
HEADER Content-Type: “{{ http content type }}”  
validate certs: “(( http validate certs }]”  
status code: [201]  
force basic auth: false  
use proxy: false  
http agent: “ansible-httppost”  
body format: “json”  
body:  
name: “[[ vrlcm pipeline name }}”  
stages:

- comments: “workflow via Ansible”  
endpoints:
- “[http://VRA.dev.loc](http://VRA.dev.loc)”  
TagName:   
Contents:
- contentDetials:
- contentName: \>-
- “{{ input }}”  
isDisabled: false  
contentYpe: “vra”  
contentVersionIds: 

input: [{ “contentName” : “Contentl - [id=62680318-7829-4e35-b5d7-62eb7c52b46c, project=Dev]”}, { “contentName”: “Content2 [id=2d29e4af-6889-459-a7f5-5af522a7ab7f, project=Dev]”}]

{  
“name”: “test”,  
“stage”:[  
{  
“comment”: “test”,  
“endpointids”: [  
“vradev.local”  
],  
“tagNames”: ,  
“Contents”:[  
{  
“contentDetails”: [  
{  
“contentName”: “Contentl - [id=62680318-7829-4e35-b5d7-62eb7c52b46c, project=Dev]”  
},  
{  
“contentName”: “Content2 - [id=62680318-7829-4e35-b5d7-62eb7c52b46c, project=Dev]”  
}  
],  
“isdisabled”: false,  
“contentType”: “vra”  
}  
],  
}  
]  
}
