Search like a Pro with webMethods API Portal

webMethods API Portal tutorial

Introduction

The primary and foremost intention of API Portal is to expose your API assets to a world of external application developers. With the increasing demand for APIs, the number of APIs hosted on your API Portal will also be huge in number.

It is important to provide an elegant search feature within your API Portal so that your external application developers can easily locate the things that they are really interested in.

As part of this tutorial, we will explore a couple of interesting search tips within API Portal.

Search for exact phrases

The most effective way to find very specific search information is to use quotation marks around your search terms. As you see in the above example a search query with a quotation around the search term provides more fine grained results matching your need.

Use filters effectively

Filters are a great way to narrow down your focus area to a specific dataset. API Portal advance search has two different types of filters

Object Type filters

Object type filter lets you choose the specific type of object that you are looking for. For example "REST API" or "REST Method". You can include zero or more object type filters.

Attribute filters

Attribute filters help you to refine your search results based on the specific attribute value match. For example in the above scenario, with the list of REST APIs if you would like to filter the APIs of version 10.4, you can add a user version based filter criteria as below:

Similar to object filters you can add multiple attribute filters as well

Use conjunctions as appropriately

API Portal allows you to combine the different attribute filter criteria by AND/OR conjuctions. You can use them to combine your search criterias as needed. For example, in the below case, I would like to do all HTTP Verbs qualified with GET and HTTP Method contains the text "export"

 

Use Fuzzy searches

API Portal has support for wildcard searches as well. You can use them when you are not very sure about the exact value to be searched for. The wild cards can be used on an object as well as attribute filters.

Character Description Example Matches
* Zero or more chars To*y

Today, Toy, Topology

       
? Exactly one character Bl??d

Blood, Blind, Bleed

Kubernetes API

I  was exploring the Kubernetes Swagger definition using our API Portal. As we know Kubernetes API server plays a key role in the Kubernetes deployment. It is the single point of entry point to manage the infrastructure. Kubernetes API provides an interface for interacting with API Server. The Kubernetes swagger definition can be found here. This spec is really comprehensive. As you can see spec in GitHub is contributed by over 150+ developers and spec has 105227 lines of code. It is almost impossible to go over this complicated spec manually.

I tried importing the spec into API Portal and I could get below meaningful Statistics by means of a simple search.

Description Stats
# resources exposed 554
# methods exposed in various resources 1080
# GET methods 537  ==> 49.8%
# POST methods 103  ==> 9.50%
# PUT methods 134  ==> 12.4%
# DELETE methods 162  ==>  15%
# HEAD methods 6      ==>    0.6%
# PATCH methods 132  ==> 12.2%
# OPTIONS methods 6  ==> 0.6%
# of methods tagged 'scheduling' 31
# of methods tagged 'storage' 70
# of methods tagged 'networking' 28

 As you know now, API Portal advanced search is a "must-have" tool for developers for exploring the API assets published on your portal.