Ansible playbook for accessing url

Hello Techies,

I am improvising my Ansible skills in a very slow pace and I got stuck here:
Is there anyway to hit my ticket management system (cherwell) url and login to it with credentials through Ansible? I’ve so far researched about uri module but not able to fetch more?

TIA.

I haven’t used cherwell but it looks like it has a REST API.

https://cherwellsupport.com/CherwellAPI/Documentation/en-US/csm_rest_api.html

You could use uri module to login and do whatever you need.

There seem to be powershell and c# examples in their documentation for example here: https://cherwellsupport.com/CherwellAPI/Documentation/en-US/csm_rest_powershell_get_search_items.html

You would need to work out what the equivalent uri module parameters are (in the powershell examples, the module parameters are going to be similar to the parameters passed to Invoke-RestMethod

Looks like you have to get a token (log in) and once you have the token pass it into any further requests you want to make to the rest api.

There are some examples in other languages here:

https://www.cherwell.com/community/builders-network/f/rest_web_api/4778/rest-api---for-complete-beginners

Hope this is enough to get you started.

Jon

Thank you very much Jon. It really helps me a lot. I really appreciate it.
Venkatesh