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.
The diagram shows how an API provider can connect to sources. Information about the sources is provided in the following text.

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 the 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:Start the wizard by choosing the Create button.
  2. Enter a name and description in the Overview tab.
  3. Enter a name and description in the Overview tab.
  4. Enter the connection data in the Connection tab.Enter the connection data in the Connection tab.

    Note

    You use your own Host details to connect to your backend system.

    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

  5. Enter the Catalog Service Settings data in the Catalog Service Settings tab.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.

  6. Test your API Provider. When you save the entries, the created API provider can be tested. To do this, use the Save button first.When you save the entries, the created API provider can be tested. To do this, use the Save button first.Choose Test Connection.

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

    Type Internet and On-Prem
    The HTTP Status code 200 means that the connection to the backend system is correctly set up:Screenshot of the message that appears to show that the connection to the system was successful.
    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:Screenshot of a message that states System is up and reachable. However, the ping check responded with code: 404; Message : Not Found.

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

For the utilization of the GWSAMPLE_BASIC API via the ES5 database, we are creating an API provider, which encapsulates the original interface. The API provider components and accompanying artifacts are marked in red in the following diagram.API Provider Diagram

Task Flow

In this exercise, you will perform the following steps:

  1. Create an API Provider based in the ES5 Demo System
  2. Test the connection.

Prerequisites

You have a functioning API Management within the SAP 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 with how to create and use an API provider of type internet into the API Management.

Task 1: Create an API Provider Based on the 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. Navigate to ConfigureAPIs

  2. Screenshot of the Configure APIs User Interface in the SAP Integration Suite

  3. Create an API provider.

    Choose the left menu on ConfigureAPIs.

    In the Configure tab, choose the API Providers tab to create an API Provider.

    Now, choose the Create button to set up an API Provider. It opens a new user interface to set up your API Provider.

    Screenshot of Configure, APIs, and API Providers tabs.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. On the Overview tab, in the Name field, enter the name from preceding the table.

      Simply override the given entry.Screenshot of SAPGatewayDemoSystemES5_Provider and the Overview tab.

    2. Switch to the Connection tab.

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

      Field NameInput
      TypeChoose Internet
      Hostsapes5.sapdevcenter.com
      Port443
      Use SSLflagged
      Screenshot of the Connection tab showing the Type, Host, Port, and Use SSL fields.

    3. Switch to the Catalog Service Settings tab.

    4. Enter the following data (excerpt from the table before this):

      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
    5. The Catalog URL is automatically created based on the data that you have entered.

    6. Choose Save.

      Screenshot of the Catalog Service Settings tab and the Path Prefix, Service Collection URL, Username, and Password fields.

Task 2: Test the Connection

Steps

  1. Test your API Provider.

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

      Choose Test Connection on the top right-hand side.
    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 that you have entered.

    4. Navigate back to ConfigureAPIs Overview.

      Navigate back to Configure → APIs Overview.
    5. Check that you can see your configured API provider.

Log in to track your progress & complete quizzes