Register and virtualize a REST API

About API Registration

API Registration means connecting back-end data sources, then creating corresponding front-end APIs for developers to use when building applications. The data source can be an existing API, a database, a Web service, etc.

The steps described here are not very challenging (if you do meet any hitch, please let us know by filling in the poll). But registering APIs into the API Catalog is a vital task for setting up AMPLIFY API Management. And for Axway, making registration straightforward and easy is an important part of making AMPLIFY API Management a tool for innovation. Thus APIs can be rapidly created, edited and made available to respond to rapidly changing customer needs.

If you want start with a short explanation about the difference between the front-end and back-end APIs, and where API registration fits in to the digital ecosystem, read Understanding Registration. The rest of this topic is a hands-on procedure describing how to do it.

REST API Registration step by step

Time to complete: 15 min approx. User role: API manager. Difficulty: low.

Note   At the beginning of each procedure we give corresponding user role(s). Your organization may use different names, and tasks may be distributed differently. The information here is provided as a suggestion only.

If you prefer, you can follow the steps in this procedure on video here. Note that the step sequence may not be exactly the same as the one described below.

Registration on the back-end

The back-end is the connection between the data source and API Manager.

  1. Open API icon > API Catalog tab. Your API catalog is empty for the time being: the first purpose of the tutorial is to start filling it. 
  2. Open API icon > Backend API tab
  3. Click New API button > select Import Swagger API
  4. Click the Select file... button and browse to the swagger_starwars.json file (downloaded during the previous step).
  5. Change the API name to Star Wars
  6. Click Import button. The new API appears in the list:
  7. The API is now registered on the back-end side. To explore its contents, click on Star Wars: the description of the API appears. You can explore the different tabs providing information about the back-end API; for example, click on API Methods to view the list of methods of the backend API.

Virtualizing on the front-end

We will now connect our API on the front-end, to make it accessible to the users of the Axway API Portal. This second phase is also known as Virtualization.

  1. Click the API icon > Frontend API tab
  2. Click New API button > select the New API from backend API item. The list of existing APIs appears, it contains just our first item: Star wars.
  3. Click on Star wars and click OK
    The detailed page of the API appears. The first tab is called Inbound, it provides the resource path and allows you to define the inbound security
  4. In the inbound security list, select the Pass Through item and click OK (this is the simplest option).
    For more information about securing APIs, read Secure your APIs section.
  5. To add a logo, click on the API tab: it contains an Image field. Click on the Image field, browse to the image star_wars.jpg among the downloaded files, then click Open button.
  6. Click the Save button

The API is now fully registered in the API catalog. 

Testing the API

Let’s test our newly registered API:

  1. Click the API Catalog tab on the left.
  2. You should now see the detailed description of the Star Wars API .
    (If you have more than one API - if you registered any APIs other than Star Wars - you will see the list of your APIs: click on Star wars in this case. )
  3. Scroll down to the API Methods section. Each method of the API is listed here.
  4. After GET /people/ , click Try it button.
  5. A window appears. A warning message may appear, ignore it. Click the Try method button.
  6. The result is JSON-type data.
  7. You can view page 2 of the output by entering 2 in the Page parameter

If you are unfamiliar with JSON format, the output described may not appear to be very readable at first, but if you take a second look you will find the names and data of the main characters of the Star Wars saga. The purpose is to be parsed by applications, using appropriate functions.

Now our first API is registered and ready to be used by developers, to build Star Wars-related applications.

More information

  • The API Manager Cloud User Guide describes procedures similar to this one, in more detail. It explains how to import existing APIs from different origins: REST , cloud, or deployed on API Gateway. It also shows how to create API methods, and connectors to other cloud application APIs such as Salesforce or ServiceNow.

Related Links