Creating a Product

Objectives

After completing this lesson, you will be able to:

  • Create a product

Create a Product

In this lesson, the following topics are discussed:

  • What are Products in Context SAP API Management?
  • Create and publish a Product.
  • Show Products at API Business Hub Enterprise Portal.
  • Navigate to your Product.
  • Navigate to your API.
  • API Business Hub Enterprise portal in a glance.

What are Products in Context SAP API Management?

Products are artifacts that appear on the SAP API Business Hub Enterprise portal. The SAP API Business Hub Enterprise portal is accessed using its own URL. This is accessible in the SAP Integration Suite Cockpit through the navigation in the upper right corner of the interface.

After opening the API Business Hub Enterprise portal, the products are displayed as tiles. The API used under a product corresponds to the API Proxy URL of the corresponding API.

Needed Roles (Role Collection) to use the API Business Hub Enterprise

To open the API Business Hub Enterprise portal, one of the following role collections is required:

  • AuthGroup.API.Admin
  • AuthGroup.API.ApplicationDeveloper

We have already assigned both role collections to the user when provisioning the Integration Suite capabilities.

If you are coming via learning.sap.com then you have to assign your user account to the mentioned Role Collections.

Open a API Business Hub Enterprise portal with published products as a sample

In this screenshot, you can see an already created product named 01_API_GWSAMPLE_BASIC_v1 based on the GWSAMPLE_BASIC_v1 API.

This page is empty, if you have not yet created a product.

The products can then be searched for, found, and consumed by developers.

Procedure for creating an Product

The following steps must be carried out in order:

  • Create a Product using the Create button.
  • Add the entries under the Overview tab.
  • Add an API under the APIs tab.
  • Choose the Publish button.
  • Open the API Business Hub Enterprise portal.
  • Check out your Product.

Create and publish a Product

Prerequisite for creating a product is a working API. The creation is started using DevelopAPI. Then navigate to the Products tab.

Choose the Create button, to start the procedure.

At least the following entries must be made:

Tab: Overview
The Name and Title should be the same. The Title is the heading of the tile. The description is also displayed on the tiles and is intended to give the user the most important information about the API.
Sample
Name: P_GWSAMPLE_BASIC_v1 Title: P_GWSAMPLE_BASIC_v1 Description: An API based on the Enterprise Procurement Model (EPM). Authentication is done using policies. No additional authentication is required.

The other entries such as Quota, Requests Every and Scope are optional and must be defined by policies.

A sample settings for that is found here: Create a Product

Tab: APIs

Here you can choose your previous created API proxy, which you can add to your creating API product. When you select the Add button, all available APIs are displayed. You can assign any combination of the displayed APIs. It is also possible to combine individual resources.

In the following case, the entire (all resources) of the GWSAMPLE_BASIC_v1 API is added.

Entries under the tabs Permissions, Rate plans and Custom Attributes are optional.

A sample setting of custom attributes is described here: Custom Attributes

Publish your Product

After the product has been configured, the product implementation must be published on the API Business Hub Enterprise portal. This is called Publish.

Show Products at API Business Hub Enterprise portal

The API Business Hub Enterprise portal is its own application. This was provisioned together with SAP management.

The API Business Hub Enterprise portal is connected to the API Management using its own URL. These can be checked under SettingsAPI if problems occur.

After opening the API Business Hub Enterprise portal, as described above, all published products display as tiles.

Navigate to your Product

At the moment you still have the possibility to choose between two representations. We use the new design. Navigate into the tile, you will be routed to the Test Environment tab.

Explanations:

  • No. 1: Here is your description of the product.
  • No. 2: Here is the metadata of the product.
  • No. 3: The design decision.
  • No. 4: The logged-in user.

To test the API, navigate to the APIs tab. Here you can now see the title of the assigned API. In this case, it is GWSAMPLE_BASIC. The name of this API is GWSAMPLE_BASIC_v1. The product name is P_GWSAMPLE_BASIC_v1.

Navigate to your API

When you select the tile with the title of the associated API, you are in the API. Under the tab, API Reference, you will find the swagger UI for calling the assigned resources.

If you successfully test a selected resource, here GET/ProductSet, you will see the well-known Proxy URL from SAP API Management as a Request URL.

API Business Hub Enterprise portal in a glance

The API Business Hub Enterprise portal offers a platform to deploy products with your associated APIs, centrally in the company. This should be the only place where developers search, find, and test APIs, and ultimately consume the corresponding proxy URL in their own processes. For this purpose, the API Business Hub Enterprise portal offers the following:

  • Your own user management
  • A role-based access to the products
  • An additional authentication Layer with its own API key
  • A self-registration Unknown developer

Resources

Resources are available at SAP Help: SAP Help Portal

Resources are also available at Blogs: Protect Your API Proxy by Adding Application Key Verification | Tutorials for SAP Developers

Summary

A product in the context of SAP API Management is its own artifact that encapsulates created APIs or parts of them (resources). The product is configured and deployed (publish) on the API Business Hub Enterprise portal. The product can be tested on the API Business Hub Enterprise portal. Access to the products can be restricted through roles.

Create a Product Based on Your Created API

Business Scenario

You want to deploy your API centrally in the company on the API Business Hub Enterprise. To do this, you must create a product and publish it.

Task flow

In this exercise, you will perform the following tasks:

  1. Create and Publish a Product.
  2. Test your Product.

Prerequisites

  • You have a working API Management.
  • You have a working API Provider.
  • You have a working API.

Outcome Of This Exercise

Get familiar with the concept of an API Product, while creating and provisioning an API Product based on a API proxy to the API Business Hub Enterprise.

What Do You Learn Within This Exercise

You can create a Product at API Business Hub Enterprise portal.

Exercise Options

To carry out this exercise, you can choose from the following options:

  1. Live Environment: Using the instructions provided below, you can perform the steps in your SAP BTP account.
  2. Platform Simulation: Follow the step-by-step instructions within the simulation.
  3. Side-by-side: Follow the step-by-step instructions within the simulation and perform the steps in your SAP BTP account simultaneously.
Note
We strongly recommend to perform the steps in the live environment.

Task 1: Create and Publish a Product

Steps

  1. Create a Product based on your API GWSAMPLE_BASIC_v1.

    1. Navigate to the Explore our EcosystemAPI Business Hub Enterprise using the top right button (as shown in the following figure).

    2. Navigate to DesignAPIs to open the API Develop view.

      See screenshot below the next substep.

    3. Choose the Products tab.

    4. Choose the Create button.

    5. Start the creation process starting with the Overview tab.

      Enter the following data.

      FieldInput
      NameAPI_GWSAMPLE_BASIC_v1
      TitleAPI_GWSAMPLE_BASIC_v1
      DescriptionAPI Based on the SAP Gateway Demo System (ES5). The authorization against the source interface is realized via policies. No extra credentials needed.

    6. Choose the APIs tab and choose the Add button.

    7. Within the Add Apis pop-up, choose the GWSAMPLE_BASIC_v1 API.

    8. Choose the OK button.

    9. Choose the Publish button.

    10. If everything works correctly, you will see the entry with the status Published.

    11. Navigate to the Explore our EcosystemAPI Business Hub Enterprise using the top right button (as shown in the following figure).

      Note

      Be aware that you need to activate your API Business Hub Enterprise Portal (by choosing the tile) before you can publish a Product.

    12. At the Home button, you will see your published product API_GWSAMPLE_BASIC_v1 with the nice description.

    13. This Welcome Page of the API Business Hub Enterprise will change soon. However, the functionalities remain the same.

    14. You can use the New Design button on the top right of the interface to change from a classical design to the new design.

Task 2: Test your Product

Steps

  1. Test your Product at API Business Hub Enterprise.

    1. Choose this tile, API_GWSAMPLE_BASIC_v1.

    2. Choose the tile with the API GWSAMPLE_BASIC_v1.

    3. On the left side choose the ProductSet entry.

    4. Choose the GET /ProductSet resource.

    5. Choose the Try out button and select the Execute button.

    6. If everything works correctly, you will see the ProductSet response with a HTTP status code200.

      Of course, it is possible to restrict access to the API to defined users. Additional authorization through an API key can also be implemented.

    7. Check out the call within the monitor at MonitorAPIs.

      Note
      The monitor may look different for you.

Log in to track your progress & complete quizzes