# ansible api 2 usage

**URL:** <https://forum.ansible.com/t/ansible-api-2-usage/22586>\
**Category:** Ansible Project\
**Created:** [September 19, 2016, 1:40pm UTC](https://forum.ansible.com/t/ansible-api-2-usage/22586 "2016-09-19T13:40:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oguz\_Yarimtepe](https://avatars.discourse-cdn.com/v4/letter/o/d07c76/32.png) [@Oguz\_Yarimtepe](https://forum.ansible.com/u/Oguz_Yarimtepe)\
**Post date:** [September 19, 2016, 1:40pm UTC](https://forum.ansible.com/t/ansible-api-2-usage/22586/1 "2016-09-19T13:40:26Z")

</div>

Hi all,

I am having trouble about using the ansible 2 api. Below is my code:

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [September 19, 2016, 5:48pm UTC](https://forum.ansible.com/t/ansible-api-2-usage/22586/2 "2016-09-19T17:48:16Z")

</div>

I believe your ssh\_\*\_args all need to be defaulted to an empty string instead of `None`.
