iWorkflow 201 (episode #01) - Introducing the iControl REST API
Welcome to the first episode in the iWorkflow 201 series. The iWorkflow 101 series focussed on the GUI-driven operation of the iWorkflow platform whereas the 201 series focuses on performing tasks via the iControl REST API.
This first episode is dedicated to those not familiar with using APIs but wanting to make that leap from GUI or Command-line Interface (CLI) management. Consequently, most of the episode will be focussed on introducing the tools you need, with some lessons on how to use them. Finally, at the end of the episode we’ll make our first API call to the iWorkflow platform.
Background Reading
If this is your first time venturing away from the GUI/CLI, or maybe you just want a refresh, I recommend you watch this great REST API introduction video posted by WebConcepts. In this video you'll see how you can communicate with popular on-line services including Facebook, Google Maps, and Instagram via their REST APIs:
It really is that straight forward. In short, you’re using the internet, but not through the traditional web browser. So, now you understand the importance of a REST API, lets move onto the tools.
The toolset
Introducing POSTMAN! POSTMAN is a Google Chrome browser application. Its great for getting to know REST API’s as it requires no scripting languages. It is a pure REST client. No, it is not the only REST tool out there. However, its supported on a number of platforms and is very straight forward. For your convenience, following are the POSTMAN Setup and Intro instruction videos:
POSTMAN Install
POSTMAN API Response Viewer
iWorkflow iControl REST API
Introduction
Ok, you’ve got the tools installed and are now are ready to go. So, lets now move on to F5’s RESTful API implementation which is called iControl REST. You will notice, on DevCentral, that there is also a SOAP/XML version of iControl. We implemented this on BIG-IP devices, back in 2001–before REST existed and before iWorkflow. Hence, the BIG-IP device has both the iControl SOAP API and the iControl REST API. iWorkflow, on the other hand, only supports F5’s iControl REST framework.
Also worth noting, the iWorkflow platform communicates with BIG-IP devices using the BIG-IP iControl REST API. If you watched the video in iWorkflow 101 (episode #02) - Install and Setup you will have noticed that the iWorkflow platform updates the BIG-IP REST Framework on older BIG-IP versions that require it. In that video I was communicating with BIG-IP version 11.6 so the REST Framework update was performed.
The lab environment
NOTE: While we will look at iWorkflow Clusters in a future 201 REST API episode it is not important in this episode and all communication will be with iworkflow1.n8lab.local on 10.128.1.130
First Contact
Just as in the 1996 feature-length Star Trek episode “Star Trek: First Contact", its time to query the iWorkflow platform. And our first URI to call will be for a list of devices known to iWorkflow. The URI:
https://10.128.1.130/mgmt/shared/resolver/device-groups/cm-cloud-managed-devices/devices
Lets start off by posting this request into POSTMAN. If you hit send before providing the login credentials then you will receive the following:
This is to be expected. You can provide the login credentials under the Authorization tab just below the request URL as show in the following diagram:
With those details added, run the query again and you should receive a JSON response like the following. In this diagram we can see properties of the iWorkflow platform:
Scrolling further down you can also see the BIG-IP and the other two iWorkflow platforms from the iWorkflow cluster.
Here it is in a video:
Summary
Congratulations!! You’re now talking to your iWorkflow platform via its iControl REST API. If you cannot wait for the next episode, where we will deploy and application services policy via REST, you may want to start looking at the iWorkflow API Reference at the bottom of this page on DevCentral: https://devcentral.f5.com/s/wiki/iWorkflow.HomePage.ashx
UPDATE: if you want to grab a POSTMAN collection to import into your environment, visit my GitHub page here
- Nathan_Pearce_1Historic F5 Account
For BIG-IP programmability you should look at AS3: https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/
but better to browse through the main article for all links: https://devcentral.f5.com/Wiki/Default.aspx?Page=homepage&NS=iworkflow
be advised that this the iWorkflow product, which has been replaced with BIG-IQ 6.1 and might behave differently then iControl against an actual BIG-IP.
- JOBrien2019Nimbostratus
can you link the next episode here? I'm really struggling with using the icontrol REST API and this is the first video/tutorial I've seen that made any sense.