# URI module - Query parameters

**URL:** <https://forum.ansible.com/t/uri-module-query-parameters/35106>\
**Category:** Ansible Project\
**Created:** [May 4, 2021, 8:33am UTC](https://forum.ansible.com/t/uri-module-query-parameters/35106 "2021-05-04T08:33:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kylian\_B](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@Kylian\_B](https://forum.ansible.com/u/Kylian_B)\
**Post date:** [May 4, 2021, 8:33am UTC](https://forum.ansible.com/t/uri-module-query-parameters/35106/1 "2021-05-04T08:33:31Z")

</div>

Hello,

I’m currently trying to use uri module in order to call an API. This API uses both body and query parameters. But the only way to use query parameters is to write them directly in the url. Is it the expected way of using it ?

Thank you for your answers,

Kylian.

PS :

An example :

- name: “Logout”  
uri:  
url: “{{base\_url}}/a\_auth\_logout?token={{token}}&ServerIP={{server\_ip}}”  
method: POST  
validate\_certs: no  
register: logout\_test

- name: “Logout expected”  
uri:  
url: “{{base\_url}}/a\_auth\_logout”  
method: POST  
validate\_certs: no  
query\_parameters:  
token: {{token}}  
serverIP: {{server\_ip}}

register: logout\_test
