In this lab, we will explore the API using an interface that is built into TMOS. This utility is useful for understanding how TMOS objects map to the REST API. The interfaces implement full Create, Read, Update and Delete (CRUD) functionality, however, in most practical use cases it’s far easier to use this interface as a ‘Read’ tool rather than trying to Create objects directly from it. You can use TMUI or TMSH to create the object as needed and then use this tool to view the created object with all the correct attributes already populated.
Note
This guide may require you to Copy/Paste information from the guide to your jumphost. To make this easier you can open a copy of the guide by using the Lab Guide bookmark in Chrome.
Open Google Chrome and navigate to the following bookmarks: BIG-IP A GUI, BIG-IP B GUI and iWorkflow GUI. Bypass any SSL errors that appear and ensure you see the login screen for each bookmark.
Warning
Skipping this step will result in errors in subsequent steps
Warning
We are using a self-signed certificate in this lab. In your environment you must make sure that you use certificates issued by your certificate authority for both production and lab equipments. Not doing so would make it possible for an attacker to do a man-in-the-middle attack and allow him the ability to steal passwords and tokens.
Navigate to the URL https://10.1.1.10/mgmt/toc
(or click the BIG-IP A
REST TOC bookmark). The /mgmt/toc
path in the URL is available on
all TMOS versions 11.6 or newer.
Authenticate to the interface using the default credentials (admin/admin
)
You will now be presented with a top-level list of various REST
resources. At the top of the page there is a search box
that can be used to find items on the page. Type net
in
the search box and then click on the ‘net’ link under iControl REST
Resources:
Find the /mgmt/tm/net/route-domain
Collection and click it.
You will now see a listing of the Resources that are part of the
route-domain(s) collection. As you can see the default route domain
of 0
is listed. You can also create new objects by clicking the
button. Additionally, resources can be deleted using the
button or edited using the button. The
is used to copy JSON formatted resource with Ctrl+C. This can be
useful when you want to slightly change an existing resource.
Click the 0
resource to view the attributes of route-domain 0 on
the device:
You can now see the properties of the route-domain 0 Resource. The components of the URI have been labeled in the screenshot below:
Note
If you would like to learn more about the iControl REST API be sure to read the Demystifying iControl REST article series at https://devcentral.f5.com/wiki/icontrolrest.homepage.ashx