Automation. We've all heard the term, and in organizations around the world, teams are working on building automation that can allow us to focus on the more pressing, random tasks that come to us throughout the day.
APIs are the key to automation. Cloudability's APIs are publicly available to any Cloudability User or Administrator, and you can take advantage of them TODAY!
To begin, you'll want to determine the tool that you're going to use for the APIs. You can use the terminal built into MacOS, Linux, or Windows, you can use a programming language like Python or Powershell if that's more familiar to you, or you can use a standalone tool such as PostMan. As a TAM, I often recommend that my clients start with PostMan to test their APIs or even just as a quick way to run a one-off API when needed (I'm looking at YOU Business Mappings!). If you need help with PostMan, please refer to this
knowledge documentation.
Once you have selected your tool (I'm going to focus on PostMan for the rest of this post), you'll need to gather your API Key. Cloudability allows any user or administrator to get their own unique API Key (at no additional charge) from User Preferences (
link to user preferences in CLDY). On the right side of the preferences page, you will either see an API Key and an option to rotate the key (if you've requested one already) or you'll see the option to enable a new API Key.
NOTE: You should keep your API Key in a secure location such as OneKey or another trusted password manager. If you accidentally share your API Key in a script, email, or otherwise, it is recommended that you rotate your API Key as soon as possible!
Now that you have your API Key, you can use it in PostMan. Here are the steps you would need to take to use that API Key to perform a task such as requesting your Azure Rightsizing recommendations from Cloudability!
- Navigate to the authorization tab in PostMan, choose "Basic Auth" from the drop menu, and put in your API Key as the Username. You don't need to enter a password.
- Gather the URL of the API from the Cloudability API Documentation
- Make sure that the REST method (to the left of where you enter the URL) is set to GET for this request.
- Click the Send button
- Review your results!
Whoa! Do those results look odd? It's not a CSV, it's JSON! Cloudability, like most API-driven applications use JSON to pass data back & forth. The reason for this is that JSON allows for multiple layers of results while CSV only allows for columns & rows. To learn more about JSON, you can
learn more here at no additional charge!
Depending on the type of API that you're wanting to run, you may need to modify some things. Some APIs use different REST methods such as PUT, POST, or even DELETE. Those types of APIs often require information in the "body" tab of PostMan. That's a discussion for a different post where we can dive deeper into APIs.
What are some API use cases that you're using in your organization?
------------------------------
Phillip Purcell
Technical Account Manager
Apptio Cloudability
------------------------------
#Cloudability