Creating an API Provider

Objective

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.

    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 typeBasic
    Usernameenter your ES5 user (P/S number )
    Passwordenter your ES5 password

    1. Navigate to ConfigureAPIs and choose Create.

    2. On the Overview tab, in the Name field enter the name from the table above.

      Simply override the given entry.

    3. Switch to the Connection tab.

      Enter the following data (excerpt from the table above):

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

    4. Switch to the Catalog Service Settings tab.

    5. Enter the following data (excerpt from the table above):

      Field NameInput
      Path Prefix/sap/opu/odata
      Service Collection URL/IWFND/CATALOGSERVICE/ServiceCollection
      Authentication typeBasic
      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 Save.

  4. Test your API Provider.

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

    2. Choose Test Connection at the top right of the screen.

    3. Check, that you receive an HTTP status code: 200.

      If you don`t get an HTTP status code: 200 check the parameters you have entered.

    4. Navigate back to ConfigureAPIs Overview.

    5. Check, that you see your configured API provider.

Log in to track your progress & complete quizzes