Creating an API Provider

Objectives

After completing this lesson, you will be able to:

  • Learn how to create an API provider using the SAP Integration Suite

API Provider Creation

In this lesson, the following topics are discussed:

  • The role of an API provider.
  • Procedure for creating an API provider.

The Role of an API Provider

An API provider defines the connection details for services running on specific hosts whose details you want to access. Use an API provider to define the following:

  • Details of the host that you want an application to reach.
  • Define any further details that are necessary to establish the connection, for example, proxy settings.

An API provider can connect to the following sources:

  • No. 1: Open Connectors.
  • No. 2: Through Cloud Connector to all SAP On-Prem Backends ( ECC, SAP S/4HANA On-Prem, PI, PO and more).
  • No. 3: Cloud Integration which delivers an OData or SOAP API.
  • No. 4: APIs from Internet.
  • No. 5: From the SAP Business Accelerator Hub for prototyping.

Procedure for Creating an API Provider

The following steps must be carried out in order:

  1. Start the wizard by choosing the Create button:
  2. Enter a name and description in the Overview tab.
  3. Enter the connection data in the Connection tab.

    The following assignment applies:

    • Internet: No. 4
    • On-Premise: No. 2
    • Open Connectors: No. 1
    • Cloud Integration: No. 3

    Each type uses different configuration data. A detailed list of the parameters that must be set can be found at: Create an API Provider

  4. Enter the Catalog Service Settings data in the Catalog service Settings tab. You start the wizard using ConfigurationAPIs and choose the Create button.

    The path information (No. 1) is standardized in SAP S/4HANA. The catalog service and path can be found in the transaction /n/IWFND/MAINT_SERVICE on the SAP backend system. A basic authorization is required to access the catalog server.

  5. Test your API Provider.

    When you save the entries, the created API provider can be tested. To do this, use the Test Connection button.

    Depending on the Type, a successful test is one of the following:

    Type Internet and On-Prem
    The HTTP status code is 200, that means OK:
    Type Open Connectors and Cloud integration
    The HTTP status code is not 200, but in this case it is correct since this is only a ping:

Sources

The following sources can be found at the SAP Help Portal: API Providers

Summary

An API provider encapsulates access to APIs from various sources. More than 260 third-party REST-based APIs are connected through the Open Connector. SAP backend systems such as SAP S/4HANA On-Prem or ECC/PI/PO can be connected through the Cloud Connector. SOAP APIs can also be made available through the Cloud Integration. Ultimately, almost all APIs can be connected. The procedure for connecting a foreign API is wizard-controlled.

Create an API Provider Based on Your ES5 Demo System

Business Scenario

In order to utilize the GWSAMPLE_BASIC API with ES5, one must generate a proxy that wraps the initial interface. This proxy is commonly referred to as an API provider. The resulting connections and artifacts are highlighted in red within the subsequent component diagram.

Task flow

In this exercise, you will perform the following steps:

  1. Log On to the API Management Configuration.
  2. Check the virtual Host name.
  3. Create API Provider.
  4. Test the Connection.

Prerequisites

You have a working API Management within the Integration Suite.

Outcome after this exercise

A running API Provider based on the ES5 demo system.

What do you learn within this exercise

You get familiar how to create and use an API provider of type internet into the API Management.

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 an API Provider based on your ES5 Demo System

Steps

  1. Log On to the API Management Portal.

    1. Log on to your API Portal within your Integration Suite as already shown several times.

    2. In any case, you should see the HelloWorldAPI. This was created when API management was configured for testing purposes.

  2. Check the Virtual Host name.

    1. Open the SettingsAPIs view and check it to see if your Virtual Host fits your requirements. The virtual host name is set during the configuration of API Management.

    2. If not, you can change the name.

      The names shown in the following screenshot do not have to be identical to your names.

  3. Create an API provider.

    Use the following data:

    FieldValue
    NameSAPGatewayDemoSystemES5_Provider
    Connection tab
    TypeChoose Internet
    Hostsapes5.sapdevcenter.com
    Port443
    Use SSLflagged
    Catalog Service Settings
    Path Prefix/sap/opu/odata
    Service Collection URL/IWFND/CATALOGSERVICE/ServiceCollection
    Authentication typeChoose Basic
    Usernameenter your ES5 user (P/S number )
    Passwordenter your ES5 password

    1. Navigate to the following: ConfigureAPIs.

    2. Choose the Create button and start on the Overview tab.

    3. In the Name field enter the name from the table above.

    4. Switch to the Connection tab.

      Enter the following data:

      Field NameInput
      TypeChoose Internet
      Hostsapes5.sapdevcenter.com
      Port443
      Use SSLflagged

    5. Switch to the Catalog Service Settings tab.

      Enter the following data:

      Field NameInput
      Path Prefix/sap/opu/odata
      Service Collection URL/IWFND/CATALOGSERVICE/ServiceCollection
      Authentication typeChoose Basic
      Usernameenter your ES5 user (P/S number )
      Passwordenter your ES5 password

    6. The Catalog URL is automatically created based on the data you have entered.

    7. Choose the Save button.

  4. Test your API Provider.

    1. When it is saved, the Test Connection button is now active.

    2. Choose the Test Connection button (top right of the screen).

    3. If everything is working correctly, you receive an HTTP status code: 200.

    4. Navigate back to ConfigureAPIs Overview.

    5. You will see your configured API provider.

Log in to track your progress & complete quizzes