From the course: Ansible: From Basics to Guru by Pearson

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Using the Tower API

Using the Tower API

In this video, you will learn about using the Tower API. So what is going on? Well, Tower provides a REST API, and that allows controlling Tower from playbooks or directly using cURL requests. So any client can perform actions using standard HTTP methods, such as GET and POST and PUT and DELETE, to interact with Tower. For instance, you can use curl minus X get HTTPS tower example.com slash API dash K. Before we continue, let's check what this is doing. So let me type curl minus X get to HTTPS colon slash slash tower.example.com slash API dash K. Dash K is for the insecure request. And what do we see? Well, we get some generic API information coming from AWX REST API, API version two. It's just version information, but it's showing that you can request the information directly from the API. Now that I'm demonstrating, there's one more thing that I would like to show you, and that is this, https://tower.example.com slash API. And of course, we accept the risk and continue. And what do…

Contents