Installing your UDP- Digital Transformation with IBM API Connect

As we stated at the beginning of this chapter, a catalog UDP has two limitations. First, it must only use policies and functionality available within APIC. Second, it must be implemented at a catalog level. Given that it must be implemented at the catalog level, you must perform the following steps for every catalog where you wish to have this UDP visible:

  1. From within the API Manager home screen, navigate to the Manage catalogs | <catalog name> | Catalog settings tab. From this screen, click the Gateway services link on the left navigation menu to bring you to the configured gateway services for this catalog.
  2. For the gateway service as regards for which you wish to implement this UDP, click the ellipses to the right of it and click View policies, as shown in the following screenshot:

Figure 12.3 – Selecting the gateway service to implement the UDP

3. You should now be presented with every built-in and custom user-defined policy available to this catalog and gateway service. In the top right of the main screen, click the Upload button to upload your new UDP.

4. You should now be looking at an Import policy screen where you can simply drag your .zip file, which contains your .yaml file, into the top box on the screen, as shown in the following screenshot:

Figure 12.4 – Uploading the UDP configuration file

Alternatively, you can click the top box to navigate to your local filesystem and upload the file. Once the file is uploaded, click the Upload button to complete the installation.

5. You will now be brought back to the Policies screen where you should see your new UDP at the top of the list. The following screenshot shows our new UDP, named redactlog, successfully installed:

Figure 12.5 – UDP successfully installed

You have now successfully installed your custom UDP in your APIC catalog and it is available for use. Let’s now take a look at how we can implement this in your APIs within the catalog.

Implementing your UDP

Now that you have your UDP successfully installed, let’s take a look at how we can use and test this new custom policy in our API flow. If you create a new or go to an existing API within the catalog where you installed your UDP, you can navigate to the Gateway tab as if you were creating your policy flow for your API assembly.

Something with which you are familiar with is the built-in policies available that you can drag onto the palette to create your assembly. If you scroll to the bottom of these available policies on the left, you should see the User Defined category with your newly created UDP listed there. You can now drag this custom policy onto your palette in your assembly, as you would any built-in policy. Figure 12.6 shows our newly created UDP, which requires a parameter to be passed in. As you can see, once this is dragged onto the palette, you are prompted for the parameter value on the right side of the page. The value entered here will be passed to the policy that can be accessed at runtime by the policy configuration.

Figure 12.6 – Implementing the UDP in your API assembly

And there you have it! You have taken a sequence of several policies and wrapped them into one reusable policy available to all APIs within the catalog. You have now seen how you can create custom, reusable policies as well as how to configure them to accept parameters that can be utilized by the underlying configuration. This feature can prove very beneficial by allowing custom configurations to become reusable assets, thereby reducing development and testing time, as well as providing consistency in your API quality.

Now that you know how to create a catalog UDP, the next step is to take a look at the second type of UDP, the global UDP, which can be shared across any Provider Organization and utilize not only APIC features but also the built-in DataPower functionality.

Leave a Reply

Your email address will not be published. Required fields are marked *