Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to make your APIs more discoverable

October 6, 2022
Vamsi Ravula Hugo Guerrero
Related topics:
APIsKubernetes
Related products:
Red Hat 3scale API ManagementRed Hat OpenShift API Management

Share:

    API discoverability is a key aspect of any API management initiative. The discoverability of an API directly impacts its adoption and usage. A typical big enterprise with multiple development teams might build hundreds of APIs that they would want to reuse internally or share with partners that build complementary applications. If the teams are not able to discover existing APIs, they might build a new API with the same functionality. It might lead to a duplication of efforts and underutilization of the existing API. It is also an unscalable practice to contact the API developer each time someone wants to use the API.

    There needs to be a better and more hands-off way for internal teams and partners to discover and understand the usage of these APIs without directly contacting the developers who built them. API discoverability does not just mean making it easy to find an API by providing an inventory (though this is the first and most important step you should take). It should also address some key aspects that are important for an API consumer, such as understanding the API through documentation, request and response format, sign-up options, and the business terms and conditions (in case of a partner) of using the API.

    Developer portals to the rescue

    Developer portals provide a convenient and scalable way to achieve this. Developer portals enable API consumers to search, filter, learn, understand, and sign up for the APIs they are interested in. Organizations can customize developer portals based on their goals and intended audience. These portals provide an easy way to build an API inventory catalog with search and filtering capabilities.

    In the subsequent sections, we will see how we can build a dynamic API catalog that addresses all of the above-mentioned use cases with Red Hat 3scale API Management.

    Building an inventory of APIs

    First, let's build an inventory of all the APIs the developer portal can access. This implementation is based on the APIs.json initiative. This would be a JSON that multiple portal elements can access and get all the information they need to show about the APIs.

    However, for different reasons, you would not want to expose all the APIs managed in 3scale API Management via this JSON. API providers can add additional checks and rules to restrict which APIs are exposed and which are not. In the following example, we will only expose the APIs when they have some basic information about them, like rate limits, pricing, support, etc. APIs that do not have this information about these aspects will be deemed ineligible for sharing and will not be discoverable. We will add this information to our APIs using the features options in application plans, so any APIs with no associated features will not be discoverable.

    Note: This is a custom condition for discoverability that we set; we can always change these rules based on our processes and business use case. For example, you can remove all these checks and conditions and make all the APIs managed through 3scale API Management discoverable.

    Follow these steps to create our APIs.json:

    1. Create a new section: In the 3scale API Management admin portal, navigate to Audience → Developer Portal → Content. Click on the New Page drop-down and select New Section (Figure 1).
      Creating a new section in the 3scale API Management admin portal
      Figure 1: Creating a new section in the 3scale API Management admin portal.
    1. Name the section catalog and change the partial path as shown in Figure 2. Click Create Section. This is the section where we will organize all the files we need for this exercise.
      Add catalog and /catalog for Title and Partial path
      Figure 2: Add catalog and /catalog for Title and Partial path.
    1. Create a new page with the title apis.json. Make sure the Layout field is empty, Liquid is enabled, and that you choose the right path and section. Copy and paste the code provided in this link (see Figure 3).
    Creating a new apis.json
    Figure 3: Create a new page: apis.json.

    Section

    Value

    Title

    apis.json

    Section

    |-catalog

    Path

    /catalog/apis.json

    Layout

    Unselect the option.

    Advanced Options > Liquid enabled

    Check the box.

    Code URL

    GitHub link

    1. From your 3scale API Management admin portal, navigate to Developer Portal → Drafts; then, click Publish All.
      Publish All Drafts
      Figure 3: Publish All drafts within the 3scale API Management admin portal.
    1. Navigate to the /catalog/apis.json endpoint of your developer portal. You should see a JSON with the list of APIs and the associated details, as illustrated in Figure 5.
      /catalog/apis.json Endpoint of Developer Portal
      Figure 5: Navigate to the /catalog/apis.json endpoint of your developer portal.

    Building an API catalog page

    The API catalog page is a key component of API discoverability. We will build a section on our developer portal that lists all the APIs and makes them searchable (see Figure 6). API consumers can perform a text search to find the APIs, filter APIs based on different criteria, click on the APIs to get more details, etc. This is how consumers will find the APIs they need.

    API Catalog
    Figure 6: API catalog page.

    Follow these steps to create our API List section:

    1. Create a new page with the title API List, as shown in Figure 7. Make sure you choose the right path and section. Copy and paste the code provided in this link. You do not need to modify the Layout and Liquid sections for this.
    Create a New Page: API List
    Figure 7: Create a new page: API List.

    Section

    Value

    Title

    API List

    Section

    |-catalog

    Path

    /catalog/list

    Code URL

    GitHub link

    The API details section

    After searching for the API on the list page and narrowing down the API, an API consumer would like to learn about the chosen API. This details page we are about to build now serves that purpose. This page contains various elements such as interactive documentation to understand details like the API request and response model, sign-up options, subscription plans, terms and conditions, and support options.

    Follow these steps to create our API details section:

    1. Create a new page with the title API Details, as shown in Figure 8. Make sure Liquid is enabled, and you choose the right path and section. Copy and paste the code provided in this link. You do not need to modify the Layout section.
      Creating an API Details Page
      Figure 8: Adding an API Details page.

    Section

    Value

    Title

    API Details

    Section

    |-catalog

    Path

    /catalog/details

    Advanced Options > Liquid enabled

    Check the box.

    Code URL

    GitHub link

    1. Navigate to Developer Portal → Drafts and click Publish All (Figure 9).
      Publish All Drafts
      Figure 9: Publish all drafts.

    Find APIs

    Finally, follow these steps to see the catalog in action.

    Note: You can also verify the dynamic nature of the catalog by adding a new API product in the 3scale API Management admin portal, with application plans and some associated features in the applications plans that are enabled and a documentation file with the same system name as the API.

    1. Navigate to /catalog/list endpoint of your developer portal, and you should be able to see a list of APIs that you can search and filter using the search bar and filters under "Categories" on the righthand side (Figure 10).
      Search and Filter your APIs
      Figure 10: Search and Filter APIs
    2. Click on an API of your choice to find more information about the API, such as interactive documentation where you can make sample calls to the API, sign up for subscription plans, etc. (see Figure 11). You can also add more sections and information based on what you think your API consumers would like to know about the API. API providers can easily add additional assets such as images and CSS files to customize the whole developer portal to be in line with their brand.

      Viewing your Catalog
      Figure 11: View your catalog.

    Conclusion

    API discoverability must be a key aspect of any organization's API strategy. API product teams would benefit by thinking about this right from the early stages of building the API rather than being an afterthought. API providers can create an effective self-service API program by incorporating aspects of API discoverability such as search, filter, categorization, documentation, usage rules, terms and conditions, etc.

    Through this exercise, you learned how to create a dynamic and interactive API catalog using Red Hat 3scale API Management that will enable the API product teams to improve the discoverability and usability of their APIs and thus facilitate the adoption of their APIs. If you want to create a similar experience on your developer portal, the links to all the files used in this demo are available on GitHub if you would like to create a similar experience on your developer portal.

    Get started with Red Hat 3scale API Management

    Red Hat 3scale API Management makes it easy to manage your APIs. Share, secure, distribute, control, and monetize your APIs on an infrastructure platform built for performance, customer control, and future growth. You can place 3scale API Management components on-premise, in the cloud, or on any combination of the two.

    Red Hat OpenShift API Management is a hosted and fully managed version of 3scale API Management. If you are interested and want to give it a try, you can do so by visiting the product page.

    Last updated: September 19, 2023

    Related Posts

    • Custom policies in Red Hat 3scale API Management, Part 1: Overview

    • Custom policies in Red Hat 3scale API Management, Part 2: Securing the API with rate limit policies

    • Packaging APIs for consumers with Red Hat 3scale API Management

    • Installing Red Hat OpenShift API Management

    Recent Posts

    • How Kafka improves agentic AI

    • How to use service mesh to improve AI model security

    • How to run AI models in cloud development environments

    • How Trilio secures OpenShift virtual machines and containers

    • How to implement observability with Node.js and Llama Stack

    What’s up next?

    API management sandbox activity image

    As a developer, once you have built your APIs, you might need to allow controlled access to these APIs to both internal and external customers. This tutorial shows how to share, secure, and publish APIs using Red Hat OpenShift API Management.

    Try Red Hat OpenShift API Management
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue