Lab 2.1 - Interact with a REST Extension

In this exercise, we are going to look at an iControl LX Extension that ships with iControl. This is the iControl LX ‘presentation’ Extension. This iControl LX Extension present the REST API with a graphical interface. In this lab, we will test it.

Typically, when you login to BIG-IP via the Web Interface you are redirected to /mgmt/xui. In this exercise we are going to review the REST API via the Web interface, which looks like this:

../../_images/lab1-image0011.png

Task 1 - View the API via Web Browser

Perform the following steps to complete this task:

  1. In your browser, navigate to: https://10.1.1.245/mgmt/toc.

  2. Enter the admin user credentials (it should be admin/admin).

  3. You are now presented with the top level of REST collections/resources available on the BIG-IP platform.

    ../../_images/lab1-image002.png

Task 2 - Interact with a REST Resource

Perform the following steps to complete this task:

  1. To filter the list of iControl REST resources, navigate to the textbox at the top of the page and enter ‘echo’:

    ../../_images/lab1-image003.png
  2. Click on the echo resource.

    ../../_images/lab1-image004.png

Task 3 - The ‘/presentation#’ Extension

Perform the following steps to complete this task:

Note

The current URI has /presentation#/ appended to the end of it. This is an iControl LX Extension responsible for rendering the iControl REST resource in the web interface.

  1. Remove the appended presentation#/ and note the raw JSON representation (you will be re-prompted to enter your user credentials admin/admin):

    ../../_images/lab1-image005.png
  2. Click the ‘Back’ button in your browser to return to the /presentation#/ view. The URL should once again be:

    https://10.1.1.245/mgmt/shared/echo/presentation#/

Task 4 - Editing a REST Resource

Perform the following steps to complete this task:

  1. Click the Edit button. You should now see the following:

    ../../_images/lab1-image006.png
  2. This allows you to edit the value of the /mgmt/shared/echo REST resource, via the presentation Extension.

  3. Click on the Advanced button. Now you can see the raw JSON representation of the REST resource.

    ../../_images/lab1-image007.png
  4. Try editing the REST resource. In the content field enter authentication works (check the picture below). Note that it synchronizes between the textboxes and the raw ‘JSON input’ textfield. They are both representations of the same resource.

    ../../_images/lab1-image008.png
  5. You are now interacting with the iControl REST resource echo, via the iControl LX ‘presentation’ Extension.

  6. Click the Cancel button to discard your changes.